bistrader Posted August 8, 2006 Posted August 8, 2006 I have 5 au3 files (Step 1 thru Step 5) that need to be run one after the other and I need to run all 5 each night. I would like to run them automatically one after the other. So, I decided to create a Total.au3 which is the following. I thought AutoIt would run the first one and not do the others until the first one is done. Then, run the second one and not touch the others until done. Etc. Nope. It tries to run all at the same time. I guess I could time each event and place sleep commands in between each run. How do others handle? ; This is Total.au3 RunWait(@ComSpec & " /c start " & "Step1.au3", "C:\AutoIt_Work\Steps\", @SW_HIDE) RunWait(@ComSpec & " /c start " & "Step2.au3", "C:\AutoIt_Work\Steps\", @SW_HIDE) RunWait(@ComSpec & " /c start " & "Step3.au3", "C:\AutoIt_Work\Steps\", @SW_HIDE) RunWait(@ComSpec & " /c start " & "Step4.au3", "C:\AutoIt_Work\Steps\", @SW_HIDE) RunWait(@ComSpec & " /c start " & "Step5.au3", "C:\AutoIt_Work\Steps\", @SW_HIDE) ; The End ....
CWorks Posted August 8, 2006 Posted August 8, 2006 (edited) just a guess but wouldn't it be start /w no it wouldn't work either i don't think just run in a batch with start /w start /w C:\AutoIt_Work\Steps\Step1.au3 start /w C:\AutoIt_Work\Steps\Step2.au3 etc.. Edited August 8, 2006 by CWorks
HELSAY Posted August 8, 2006 Posted August 8, 2006 I suppose your scripts displays screens ... If yes, check the autoit help file for commands like WINWAITxxx Logicae Homo EstFemina Homo EstFemina Logicae Est
Moderators SmOke_N Posted August 8, 2006 Moderators Posted August 8, 2006 Try this:$File = @HomeDrive & '\AutoIt_Work\Steps\Step' For $i = 1 To 5 RunWait(@AutoItExe & ' /AutoIt3ExecuteScript ' & FileGetShortName($File & $i & '.au3')) Next 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.
bistrader Posted August 9, 2006 Author Posted August 9, 2006 Thanks. I will try each. I already tried WinWait stuff but it did not work. I am guessing that placing start w/ over and over again in AllSteps.bat might work. This is what I understand Cworks to be saying. And, I like SmOke N's loop approach. Gee, where do you guys come up with these names. Never mind. Thanks again for the help.
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