hemal Posted May 30, 2018 Share Posted May 30, 2018 How can I call another script from the existing one. Link to comment Share on other sites More sharing options...
Xandy Posted May 30, 2018 Share Posted May 30, 2018 (edited) Compile SomeScript to exe and ShellExecute("SomeScript.exe"). If opening a script also executes it on your machine may be able to use ShellExecute("SomeScript.au3"). Run("SomeScript.exe") probably works too. If you need inter-process communication you can read from: stdout using $pid returned from Run() Edited May 30, 2018 by Xandy Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
hemal Posted June 4, 2018 Author Share Posted June 4, 2018 (edited) Thanks for prompt reply. . . Edited June 4, 2018 by hemal Xandy 1 Link to comment Share on other sites More sharing options...
kylomas Posted June 5, 2018 Share Posted June 5, 2018 hemal, The scripts do not have to be compiled although they certainly can be. Script 1 calls script 2 below... ; script 1 #include <MsgBoxConstants.au3> msgbox($mb_ok,'Script 1',"Hi, I'm script 1" & @crlf & 'Hit Enter to call script 2') ShellExecute('C:\Users\Tom\Documents\AI Help Scripts\script 2.au3') ; script 2 #include <MsgBoxConstants.au3> msgbox($mb_ok,'Script 2',"Hi, I'm script 2") There are other ways to do this also. All of them described in the Help file. kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
aa2zz6 Posted June 5, 2018 Share Posted June 5, 2018 I use this piece so it calls for another script and it waits for that called script to finish before it moves on. RunWait(@AutoItExe & ' "' & @ScriptDir & "\Scripts\" & 'Setup.au3"') Link to comment Share on other sites More sharing options...
Juvigy Posted June 5, 2018 Share Posted June 5, 2018 Mind that it depends what is the default action for .au3 files. For example the bellow line could have different outcomes depending on that. ShellExecute('C:\Users\Tom\Documents\AI Help Scripts\script 2.au3') Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now