El-Trucha Posted January 1, 2005 Share Posted January 1, 2005 Hello every1!! I need to run several loops at once within the same script...how?? Thanx!! Btw, what I'm doing is................a time machine............ El-Truchahttp://www.truchasoft.tk[url="ftp://tsfc.homeftp.net"]ftp://tsfc.homeftp.net[/url]hotline://tsfc.ath.cx Link to comment Share on other sites More sharing options...
Wolvereness Posted January 1, 2005 Share Posted January 1, 2005 (edited) Hello every1!! I need to run several loops at once within the same script...how?? Thanx!! Btw, what I'm doing is................a time machine............ <{POST_SNAPBACK}>For having them run at EXACTLY the same time you have to have multiple autoit programs running.Otherwise you can mix all the functions withen ONE loop.You can also nest them by just having the loop withen the loop like:For $countA = 1 To 5 For $countB = 1 to 5 MsgBox(0,'',$countA & @CRLF & $countB) Next Next Edited January 1, 2005 by Wolvereness Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote] Link to comment Share on other sites More sharing options...
El-Trucha Posted January 3, 2005 Author Share Posted January 3, 2005 Oooohh...ok...the problem is that all my functions have loops in them!! Thanx!! El-Truchahttp://www.truchasoft.tk[url="ftp://tsfc.homeftp.net"]ftp://tsfc.homeftp.net[/url]hotline://tsfc.ath.cx Link to comment Share on other sites More sharing options...
the_lord_mephy Posted January 3, 2005 Share Posted January 3, 2005 You can't run more than one function at once anyway. My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
El-Trucha Posted January 3, 2005 Author Share Posted January 3, 2005 Ohh...well, I'll find a way 2 do it then... Thanx!! El-Truchahttp://www.truchasoft.tk[url="ftp://tsfc.homeftp.net"]ftp://tsfc.homeftp.net[/url]hotline://tsfc.ath.cx Link to comment Share on other sites More sharing options...
MHz Posted January 3, 2005 Share Posted January 3, 2005 This is possibly closest thing to 2 loops at once, that you can have. You can have several functions in the main while loop. $x is just inserted, to make it safely stop at 10 loops. example:Run('notepad') $x = 1 while $x < 10 $x = $x + 1 WinWaitActive('Untitled') Send(@sec & 'loop' & @cr) loop() WEnd Func loop() While 1 WinWaitActive('Untitled') Send(@sec & 'func' & @cr) ExitLoop WEnd EndFunc Link to comment Share on other sites More sharing options...
El-Trucha Posted January 3, 2005 Author Share Posted January 3, 2005 Yah, thats what I was doing till now... Thanx!!! El-Truchahttp://www.truchasoft.tk[url="ftp://tsfc.homeftp.net"]ftp://tsfc.homeftp.net[/url]hotline://tsfc.ath.cx Link to comment Share on other sites More sharing options...
kanumi Posted January 3, 2005 Share Posted January 3, 2005 For running your script code in concurrent pathes you would need threads. Sorry currently no threads support for scripts in AutoIt. (As far as i know the AutoIt engine uses additional threads when needed, but does not expose threading to direct use by scripts.) Alternatively You can split Your code and run it in parallel processes by starting multiple AutoIt scripts. Link to comment Share on other sites More sharing options...
El-Trucha Posted January 4, 2005 Author Share Posted January 4, 2005 Umm...I'm gonna run 2 scripts @ the same time... But can one script access the other script's variables?? Both scripts/loops need 2 access GUI variables... Thanx!! El-Truchahttp://www.truchasoft.tk[url="ftp://tsfc.homeftp.net"]ftp://tsfc.homeftp.net[/url]hotline://tsfc.ath.cx Link to comment Share on other sites More sharing options...
Blue_Drache Posted January 4, 2005 Share Posted January 4, 2005 (edited) What about adding FileRead and FileWrite to the loops that both scripts will access? That way you could make sure that both scripts have access to the variables you need? Set up a section that will poll the file for the variable you're looking for about once every 250 to 500 msec Edited for spelling Edited January 4, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
El-Trucha Posted January 4, 2005 Author Share Posted January 4, 2005 Hmm...how would I do that?? Sorry, I dont get it... El-Truchahttp://www.truchasoft.tk[url="ftp://tsfc.homeftp.net"]ftp://tsfc.homeftp.net[/url]hotline://tsfc.ath.cx Link to comment Share on other sites More sharing options...
kanumi Posted January 5, 2005 Share Posted January 5, 2005 If Your scripts have windows (even hidden) you can pass data by setting the contents of one windows (hidden) control (e.g. text for a text control by using ControlSetText) from the other window. Link to comment Share on other sites More sharing options...
El-Trucha Posted January 5, 2005 Author Share Posted January 5, 2005 Oooohh...ok, thanx!! El-Truchahttp://www.truchasoft.tk[url="ftp://tsfc.homeftp.net"]ftp://tsfc.homeftp.net[/url]hotline://tsfc.ath.cx 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