Jump to content
Sign in to follow this  
Dirk98

run *.au3 script from AutoIt script

Recommended Posts

Dirk98

Guys, is there a command, similar to RUN(), that can launch *.au3 scripts?

SchellExecute() opens the script in the editor on my system. But I need to run the script istead. I know I can compile it first, but for convenience I need to keep the 2nd script uncompiled in the *.au3 form.

Thanks.

Share this post


Link to post
Share on other sites
SmOke_N

/AutoIt3ExecuteScript

Edit:

But from SciTE you could just choose the F5 option.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Nahuel

ShellExecute("script.au3","Run")

Share this post


Link to post
Share on other sites
Dirk98

ShellExecute("script.au3","Run")

Nahuel, this one OPENS in the editor, not runs it, unfortunately.

Share this post


Link to post
Share on other sites
Dirk98

/AutoIt3ExecuteScript

Edit:

But from SciTE you could just choose the F5 option.

SmokeOn, could you please say it again:

/AutoIt3ExecuteScript

- I can't find it.

Share this post


Link to post
Share on other sites
Nahuel

Nahuel, this one OPENS in the editor, not runs it, unfortunately.

haha, sorry.. I got to start testing my scripts before posting them. Try these:

ShellExecute("Notas de Escritorio.au3","","","Run")

ShellExecute("Notas de Escritorio.au3","","","Edit")

Share this post


Link to post
Share on other sites
SmOke_N

SmokeOn, could you please say it again: - I can't find it.

With /AutoIt3ExecuteScript, there is no need for AutoIt to be installed on the end users computer as it is with the ShellExecute Method.

You could send an AutoIt exe you made, and run scripts off that one exe as much as you wanted with the command line /AutoIt3ExecuteScript

Here are some examples in the Examples forum of use:

http://www.autoitscript.com/forum/index.ph...t3ExecuteScript

Here is the help file documentation:

http://www.autoitscript.com/autoit3/docs/intro/running.htm


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Dirk98

haha, sorry.. I got to start testing my scripts before posting them. Try these:

ShellExecute("Notas de Escritorio.au3","","","Run")

ShellExecute("Notas de Escritorio.au3","","","Edit")
Yes! Thanks again, Nahuel. :)

Share this post


Link to post
Share on other sites
Nahuel

With /AutoIt3ExecuteScript, there is no need for AutoIt to be installed on the end users computer as it is with the ShellExecute Method.

You could send an AutoIt exe you made, and run scripts off that one exe as much as you wanted with the command line /AutoIt3ExecuteScript

Here are some examples in the Examples forum of use:

http://www.autoitscript.com/forum/index.ph...t3ExecuteScript

Here is the help file documentation:

http://www.autoitscript.com/autoit3/docs/intro/running.htm

Very interesting.. I didn't know this. Thanks.

Share this post


Link to post
Share on other sites
SmOke_N

Very interesting.. I didn't know this. Thanks.

Here's an example:

_RunAu3AsExe('SOMESCRIPT.AU3')

;Be sure to add a space before any param string
Func _RunAu3AsExe($hFileIn, $strParams = "", $sWorkingDir = "", $sShowHide = @SW_HIDE, $nSTDOut = 0);Returns PID of newly spawned exe
    Return Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & _
                $hFileIn & '"' & $strParams, $sWorkingDir, $sShowHide, $nSTDOut)
EndFuncoÝ÷ ØGbµ8^/z+-¢¯y«®*m­©ß®ì^Ûò-)ä¶zZ0ÆzÛ^­ìZ^.!z·²¢ç¯zØ^{¥¡Æ­è~Ø^jíÞÅëh²°ß¡ö®¶­seõ'VäS44WRWFôDWRÂb33µ4ôÔU45$BäS2b33² £´&R7W&RFòFB76R&Vf÷&Rç&Ò7G&æp¤gVæ2õ'VäS44WRb33c¶WFôDWRÂb33c¶fÆTâÂb33c·7G%&×2ÒgV÷C²gV÷C²Âb33c·5v÷&¶ætF"ÒgV÷C²gV÷C²Âb33c·56÷tFRÒ5uôDRÂb33c¶å5DD÷WBÒµ&WGW&ç2BöbæWvÇ7væVBWP &WGW&â'Vâb33²gV÷C²b33²fײb33c¶WFôDWRfײb33²gV÷C²ôWFôC4WV7WFU67&BgV÷C²b33²fײð b33c¶fÆTâfײb33²gV÷C²b33²fײb33c·7G%&×2Âb33c·5v÷&¶ætF"Âb33c·56÷tFRÂb33c¶å5DD÷WB¤VæDgVæ
Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
Nahuel

Here's an example:

_RunAu3AsExe('SOMESCRIPT.AU3')

;Be sure to add a space before any param string
Func _RunAu3AsExe($hFileIn, $strParams = "", $sWorkingDir = "", $sShowHide = @SW_HIDE, $nSTDOut = 0);Returns PID of newly spawned exe
    Return Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & _
                $hFileIn & '"' & $strParams, $sWorkingDir, $sShowHide, $nSTDOut)
EndFunc
Awesome. Could be useful to use as some sort of 'extension' for your apps. And no need for Autoit installed you say? Cool.

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.