AutoVee Posted July 2, 2014 Share Posted July 2, 2014 Hi, I am new to AutoIt but I have successfully created the script that I need, a script that will start a game server and set up all the necessary options for me so that with one click I can have a server up and running quickly. So far so good. But now I have a few of these scripts, each starts a different server, and I want to make a "master script", a script that would simply call, one by one, the scripts that start each server. So, this master script would call the script the starts server 1, would wait the script to finish its job, then it would call the script that starts server 2, so on. How can I do this? I did some research on the matter but unfortunately I could not find an answer. My scripts are NOT compiled, and I'd like to keep them that way, so what I am looking for is to write a non-compiled master script that would run the other non-compiled individual scripts. Thanks for any enlightenment. P.S. - BTW, thanks for AutoIt, a great automation tool. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 2, 2014 Moderators Share Posted July 2, 2014 AutoVee,Welcome to the AutoIt forum. While I am happy for the specific question you have asked to be answered, you should read the Forum rules (there is also a link at bottom right of each page) before you post again as you will need to tread very carefully with any follow-ups. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
AutoVee Posted July 2, 2014 Author Share Posted July 2, 2014 That's interesting. So I just read the rules and it says that I should not ask for help with AutoIt scripts, post links to, or start discussion topics on ... automation or script interaction with games or game servers, regardless of the game. So I guess my post is in violation of the rules. Then again, I could rephrase the question and just say that I have created a script 1 that starts application 1 and a script 2 that starts application 2 and so on and that now I am trying to find a way to have a script to run those individual scripts, one by one, because this is exactly what I am doing. The fact that the application is a 14-year old game is irrelevant to my question. It is about running scripts with a script. Thank you anyway. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 2, 2014 Moderators Share Posted July 2, 2014 AutoVee, my question. It is about running scripts with a scriptWhich is why I posted: While I am happy for the specific question you have asked to be answeredM23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
iCode Posted July 2, 2014 Share Posted July 2, 2014 ... I have created a script 1 that starts application 1 and a script 2 that starts application 2 and so on and that now I am trying to find a way to have a script to run those individual scripts, one by one ... look at Run() / RunWait() and FileFindFirstFile() / FileFindNextFile() in the help file, which you might find useful if all your scrips are in the same directory or maybe create a little GUI for your script and use it to list and run the scripts you choose to run - you can use koda for that if you wanted, which is in the AutoIt Script Editor package FUNCTIONS: WinDock (dock window to screen edge) | EditCtrl_ToggleLineWrap (line/word wrap for AU3 edit control) | SendEX (yet another alternative to Send( ) ) | Spell Checker (Hunspell wrapper) | SentenceCase (capitalize first letter of sentences) CODE SNIPPITS: Dynamic tab width (set tab control width according to window width) Link to comment Share on other sites More sharing options...
AutoVee Posted July 2, 2014 Author Share Posted July 2, 2014 (edited) look at Run() / RunWait() and FileFindFirstFile() / FileFindNextFile() in the help file, which you might find useful if all your scrips are in the same directory or maybe create a little GUI for your script and use it to list and run the scripts you choose to run - you can use koda for that if you wanted, which is in the AutoIt Script Editor package I had looked at RunWait() but it says that the application should be an EXE, BAT, COM, or PIF file and I wanted to run the scripts directly, as I do if I click "Run Script" in the right-click menu. I do not know what a PIF file is. Couldn't I just make a script with the lines below? RunWait(script1.au3) RunWait(script2.au3) RunWait(script3.au3) That would be basically what I want, simple. Well, I will test it anyway and see what happens. I will take a look at this koda application too. Thanks. P.S. - my guess is that if RunWait(scriptX.au3) works, it will just call the script editor because this is what happens when I double-click an .au3 file. So another question is how do I change the behaviour of the .au3 file so that when I double-click it it will run and not call the editor? Edited July 2, 2014 by AutoVee Link to comment Share on other sites More sharing options...
AutoVee Posted July 2, 2014 Author Share Posted July 2, 2014 I just found this recent question that is the same as mine. '?do=embed' frameborder='0' data-embedContent>> Seems to have an answer for me. :-) Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 2, 2014 Moderators Share Posted July 2, 2014 AutoVee,I was just about to post a link to that thread - but you found it first. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Solution AutoVee Posted July 2, 2014 Author Solution Share Posted July 2, 2014 Problem solved. The command: ShellExecuteWait('Script1.au3') does the trick for me. I just had to teach Windows to use AutoIT as the default app to call when double-clicking an AU3 file since I guess when I installed SciTE it took over the task for it. 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