zasxes Posted November 2, 2007 Share Posted November 2, 2007 How do I get the while look to continue to loop and not wait for the Test func to complete. Can the Test() func be called while it is already running? $Test = 0 While 1 $Test = $Test+1 Sleep (3000) Test($Test) WEnd Exit Func Test($1) IniWrite("C:\Temp\mytest.ini", "section2", @HOUR & ":" & @MIN & ":" & @SEC, "Event Start = " & $1) Sleep (5000) IniWrite("C:\Temp\mytest.ini", "section2", @HOUR & ":" & @MIN & ":" & @SEC, "Event End = " & $1) EndFunc Link to comment Share on other sites More sharing options...
Achilles Posted November 2, 2007 Share Posted November 2, 2007 I think what you have would work, except it seems rather pointless... This will just keep on overlapping itself until their are tons of function Test() waiting to to the second part of the IniWrite(). My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
ChrisL Posted November 2, 2007 Share Posted November 2, 2007 How do I get the while look to continue to loop and not wait for the Test func to complete. Can the Test() func be called while it is already running? $Test = 0 While 1 $Test = $Test+1 Sleep (3000) Test($Test) WEnd Exit Func Test($1) IniWrite("C:\Temp\mytest.ini", "section2", @HOUR & ":" & @MIN & ":" & @SEC, "Event Start = " & $1) Sleep (5000) IniWrite("C:\Temp\mytest.ini", "section2", @HOUR & ":" & @MIN & ":" & @SEC, "Event End = " & $1) EndFunc You can not multi thread so you can't do 2 things at exactly the same time, there are various methods fro trying to fake multi threading using methods from posting gui messages to tcp/ip to text files to communicate between the 2 scripts. Search for +multi +threading [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
zfisherdrums Posted November 2, 2007 Share Posted November 2, 2007 And there's always the option of using AutoItX3.dll in a language with multi-threaded capability. But that could be a whole other set of headaches. Zach... Identify .NET controls by their design time namesLazyReader© could have read all this for you. Unit Testing for AutoItFolder WatcherWord Doc ComparisonThis here blog... 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