newuser1234 Posted April 18, 2016 Share Posted April 18, 2016 Hello, I currently have 4 scripts that I am using to pull data from a website, each pulling the same data but over a different period of time. I would like to be able to run each of these scripts via "one click", but I would need to spread them out so that the run sequentially in that no two of them are downloading data simultaneously. I know that I could do this manually by staggering each script by pausing it, but I was wondering if there was a more elegant solution but I find myself unable to find any information. Thanks in advance! Link to comment Share on other sites More sharing options...
MuffinMan Posted April 18, 2016 Share Posted April 18, 2016 If you had a 5th script that just ran the 4 current scripts using RunWait, would that serve your purpose? RunWait("script1.exe") RunWait("script2.exe") RunWait("script3.exe") RunWait("script4.exe") Link to comment Share on other sites More sharing options...
markyrocks Posted April 18, 2016 Share Posted April 18, 2016 (edited) You could just combine them to one script and have each script contents in a function and just call functions sequentially. Script1() Script2() Script3() Func Script1() ;script contents Endfunc Func Script2() ; Script2 contents EndFunc ;ect Edit: on second thought that probably won't work if you have custom functions declared in the scripts..... thinking O you could #include the scripts in like the master script. Put the body of the secondary scripts in functions and then call the functions as I described above. Edited April 18, 2016 by markyrocks Spoiler "I Believe array math to be potentially fatal, I may be dying from array math poisoning" Link to comment Share on other sites More sharing options...
newuser1234 Posted April 19, 2016 Author Share Posted April 19, 2016 22 hours ago, MuffinMan said: If you had a 5th script that just ran the 4 current scripts using RunWait, would that serve your purpose? RunWait("script1.exe") RunWait("script2.exe") RunWait("script3.exe") RunWait("script4.exe") This actually worked great! Didn't realize that it'd be that simple. Thank you both for the help! 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