Jump to content
Sign in to follow this  
njl52

ShellExecute editing rather then running

Recommended Posts

njl52

Probably a simple problem, but I am stumped. I'm doing ShellExecuteWait("script.au3") and it is opening it in SciTE. I'm trying to get it to run "script.au3".

Thanks.

Share this post


Link to post
Share on other sites
PsaltyDS

Probably a simple problem, but I am stumped. I'm doing ShellExecuteWait("script.au3") and it is opening it in SciTE. I'm trying to get it to run "script.au3".

Thanks.

Scripts are not directly executable. They are text files interpreted by the AutoIt binary. You need to run AutoIt3.exe and pass the script text file as a prameter:
ShellExecuteWait("AutoIt3.exe", "Script.au3")

Note that AutoIt3.exe and the script file might need a full path.

^_^


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
trancexx

Or if you look in registry you will see that you can do something like this:

ShellExecuteWait("Script.au3", "", "", "run")

or this:

ShellExecuteWait("Script.au3", "", "", "compile")

or even this (depending on what you have installed):

ShellExecuteWait("Script.au3", "", "", "compile with option")

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
PsaltyDS

Or if you look in registry you will see that you can do something like this:

ShellExecuteWait("Script.au3", "", "", "run")

or this:

ShellExecuteWait("Script.au3", "", "", "compile")

or even this (depending on what you have installed):

ShellExecuteWait("Script.au3", "", "", "compile with option")
I hadn't looked for the "run" verb. That's a good option.

Of course the default verb is "open", and if you selected "Edit Script" instead of "Run Script" at AutoIt install time that opens it in SciTE.

^_^


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.