Jump to content

ShellExecute editing rather then running


 Share

Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...