DW1 Posted July 29, 2007 Posted July 29, 2007 without interfering with script A right?Script A will only run once, then script B will loop. you can not have two loops running at once ( A loop IN a loop is ok ) AutoIt3 Online Help
PsaltyDS Posted July 29, 2007 Posted July 29, 2007 Take a look: I'm aware that While, WEnd tags will loop the script between it. But the thing that is bugging me is...when I execute the script, script A will run until it reaches script B, and then script B keeps looping right without interfering with script A right? I know it's a dumb question, but is that what happens? Two examples of how you might loop them both: If the two scripts (functions, really) are nice and short: While 1 ; <script A> ; ... ; </script A> ; <script B> ; ... ; </script B> WEndoÝ÷ Øíìéh«jwf¢·¢jeÆyÖ®¶sevÆR õ67&D õ67&D"¥tVæ@ ¤gVæ2õ67&D ²b3c·67&BfwC° ²ââà ²fÇC²÷67&BfwC°¤VæDgVæ2³ÓÒfwCµõ67&D ¤gVæ2õ67&D" ²b3c·67&B"fwC° ²ââà ²fÇC²÷67&B"fwC°¤VæDgVæ2³ÓÒfwCµõ67&D Autoit is not multi-threaded. If you want both running at the same time, you have to run two separate scripts, or settle for some dodgey approximation using AdlibEnable() and more complex logic. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Paulie Posted July 29, 2007 Posted July 29, 2007 Thank you for the replies.If I were to run 2 separate loopy scripts with the 'While,WEnd tags', will it cause my CPU to crash or will script A prevent script B from running?There is no way to tell whether the scripts will interfere with one another or cause problems unless we can see the script.
PsaltyDS Posted July 29, 2007 Posted July 29, 2007 Thank you for the replies.If I were to run 2 separate loopy scripts with the 'While,WEnd tags', will it cause my CPU to crash or will script A prevent script B from running? Should I add a short sleep in between long loops to prevent CPU overload?Your code is no more likely to to peg the CPU usage or crash as two scripts than as one. If the code's bad, the code's bad.The point of two separate scripts is to let them run simultaneously and independent of each other.We are talking here of two compiled scripts, running as separate processes. SciTE (you are using SciTE, right?) will open many scripts at once for edit, but will only run (F5) one at a time. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Infinitex0 Posted July 29, 2007 Posted July 29, 2007 yea, but by right clicking>run script you can run 2 The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]
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