How can I run VBS script from UE IDE?

Help with setting up and configuring custom user tools in UltraEdit (based on command line input)

How can I run VBS script from UE IDE?

Postby asa32sd23 » Wed Nov 09, 2011 7:07 pm

First time using UE as a trial to see if I need the upgrade.

I have a VBS script that I have created. Is there a way I can "run" the script right from the UE interface or do I need to save and double click the VBS script?

I see that UEStudio has the functionality was wondering if possible in UE?

thanks
asa32sd23
Newbie
 
Posts: 2
Joined: Wed Nov 09, 2011 1:46 pm

Re: How can I run VBS script from UE IDE?

Postby bulgrien » Wed Nov 09, 2011 9:19 pm

It is not possible to execute a vbScript from in the UE IDE... though I have suggested to IDM that they enhance UES to support Windows script execution and debugging like vbsEdit does.
User avatar
bulgrien
Master
Master
 
Posts: 92
Joined: Fri Dec 11, 2009 1:02 am
Location: Pennsylvania, USA

Re: How can I run VBS script from UE IDE?

Postby Mofi » Thu Nov 10, 2011 3:46 am

You can run Visual Basic scripts directly from within UltraEdit by configuring a user tool. Open Advanced - Tool Configuration and enter following on the 3 tabs:

On tab Command:

Menu Item Name: Run Visual Basic Script (for example)
Command Line: C:\Windows\System32\wscript.exe "%f"
Working Directory: (let it empty or use just %p)
Toolbar bitmap/icon: (let it empty or browse to a BMP or ICO file)
You could extract an icon from wscript.exe, if you want an appropriate icon for the tool.


On tab Options:

Program Type: Dos Program
Save Active File: checked
Save all files first: unchecked

On tab Output:

Command Output: Append to existing
Show DOS Box: unchecked
Capture Output: unchecked
Replace selected text with: No replace

The configured user tool added with button Insert can be executed from menu Advanced, by hotkey which can be changed in the Key Mapping configuration dialog (AdvancedUserToolx), or from the toolbar if you customize it and add the command User Tool x.

If your VBS files usually print something to standard output console, you should use on third tab Output:

Command Output: Output to list box
Show DOS Box: unchecked
Capture Output: checked
Replace selected text with: No replace

This user tool saves on execution the active file and then calls Windows Scripting Host with full name of the active file for being interpreted and executed.

Additional options as wscript.exe /? shows with a prompt message can be used also on command line.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4049
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: How can I run VBS script from UE IDE?

Postby asa32sd23 » Thu Nov 10, 2011 1:57 pm

thanks Mofi, that worked!
asa32sd23
Newbie
 
Posts: 2
Joined: Wed Nov 09, 2011 1:46 pm


Return to Custom User Tools/Tool Configuration