przemilke Posted April 22, 2010 Share Posted April 22, 2010 Hi all, im a new one on this forum. Im going to organise testing of large desktop application using autoIT. Ive a simple question about possibility of scripts run methods. I will describe my idea: Ive 100 scripts: 001_test.au3 (which launch desktop aplication) 002_test.au3 (function 1) 003_test.au3 (function 2) ... 100_test.au3 (function 99 and close application) What is the best solution to run these scripts one after another (when one is finished, another starts)? Maybe its possible to export names of files to external file *.au3 and control that kind of running from that file? Maybe its possible to run one script from level previous one? What u think about that? Link to comment Share on other sites More sharing options...
Fire Posted April 22, 2010 Share Posted April 22, 2010 Hi. If i understand correctly your question this can be for you solution: For $i=1 To 10 FileWrite(@ScriptDir&"\msgbox"&$i&".au3","MsgBox(64,""SIMPLE MSGBOX"",""SIMPLE MSGBOX"",1)") ;1 second timeout for msgbox RunWait(@AutoItExe & " /AutoIt3ExecuteScript" & " " & """" & @ScriptDir&"\msgbox"&$i&".au3" & """") ;<==Running generated Scripts FileDelete(@ScriptDir&"\msgbox"&$i&".au3") Next MsgBox(64,"END OF EXECUTION","END OF EXECUTION",3) Exit [size="5"] [/size] Link to comment Share on other sites More sharing options...
storme Posted April 23, 2010 Share Posted April 23, 2010 Hi all, im a new one on this forum. Im going to organise testing of large desktop application using autoIT. Ive a simple question about possibility of scripts run methods. I will describe my idea: Ive 100 scripts: 001_test.au3 (which launch desktop aplication) 002_test.au3 (function 1) 003_test.au3 (function 2) ... 100_test.au3 (function 99 and close application) What is the best solution to run these scripts one after another (when one is finished, another starts)? Maybe its possible to export names of files to external file *.au3 and control that kind of running from that file? Maybe its possible to run one script from level previous one? What u think about that? You've got a few options. Add a Run ( "program" [, "workingdir" [, show_flag[, opt_flag ]]] ) to the end of each of your programs to run the next. This would have the advantage that if one of the steps fails you can just run whatever step/script you want and the sequence will continue. OR Write a script with 100 RUNWAIT commands to run each of your scripts. Runs an external program and pauses script execution until the program finishes. RunWait ( "program" [, "workingdir" [, show_flag [, opt_flag ]]] ) Check out the help file for more details. BTW why do you want 100 scripts? Why not put all the tests in one script? Good Luck John Morrison aka Storm-E Some of my small contributions to AutoIt Browse for Folder Dialog - Automation SysTreeView32 | FileHippo Download and/or retrieve program information | Get installedpath from uninstall key in registry | RoboCopy function John Morrison aka Storm-E 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