Launch a macro or windows program from menu or button

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

Launch a macro or windows program from menu or button

Postby SAbboushi » Mon May 29, 2006 4:39 pm

Hi-

Is there a way for me to run a specific macro or a specific windows program via a custom menu selection and a custom (toolbar) button?

With Regards-
Sam
User avatar
SAbboushi
Basic User
Basic User
 
Posts: 37
Joined: Sun Nov 07, 2004 12:00 am

Re: Launch a macro or windows program from menu or button

Postby Mofi » Tue May 30, 2006 5:06 am

Windows programs - yes, if you set up a user tool for every program. Macros - no, use the macro list view.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4058
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Launch a macro or windows program from menu or button

Postby SAbboushi » Wed May 31, 2006 3:29 am

Hi Mofi-
Thanks for your post.
I used Tool Configuration and inserted a user tool:

For Command Line, I browsed to the vbs script that I want to run. I then checked Windows Program.

Launching it results in "Error creating process193".

I found another post where you had advised adding %F which I tried - but with same result.

Any idea what I am doing wrong?

With Regards-
Sam
User avatar
SAbboushi
Basic User
Basic User
 
Posts: 37
Joined: Sun Nov 07, 2004 12:00 am

Re: Launch a macro or windows program from menu or button

Postby Mofi » Wed May 31, 2006 5:34 am

A vbs file is not a program, it is only a script file and needs an interpreter for execution. For Windows XP it is WScript.exe. The correct command line to execute your vbs file would be

C:\Windows\System32\WScript.exe "name of your script file with path"

or if you want to run the vbs file currently open in UltraEdit

C:\Windows\System32\WScript.exe "%f"

And wscript.exe is a Windows program. So don't forget to select the "Windows Program" option in the tool configuration dialog.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4058
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Launch a macro or windows program from menu or button

Postby SAbboushi » Thu Jun 01, 2006 3:10 am

Thanks Mofi - I appreciate your help.

With Regards-
Sam
User avatar
SAbboushi
Basic User
Basic User
 
Posts: 37
Joined: Sun Nov 07, 2004 12:00 am


Return to Custom User Tools/Tool Configuration