Levenson Posted June 26, 2008 Share Posted June 26, 2008 (edited) He everyone. I have note that when i activate a timer( it happens every 5 sec) the main script is slow down. I run a counter in main part and it works longer than 20 sec then it was. Is it normal? Is it works in two threads or the main script paused? expandcollapse popup;~ Setting timer $TimerHandle = _Timer_SetTimer($formMain, 5000, "_MsgTimerEvent") ... ;~ Here is my main cycle. $a - is an amount of seconds and it works more longer then it should be. For $a = Round(GUICtrlRead($InputTimeCircle), -1) To 0 Step -1 WinSetTitle("Debug", "", "Debug - " & $a) Sleep(1000) Next WinSetTitle("Debug", "", "Debug") ... Func _MsgTimerEvent($hWnd, $Msg, $iIDTimer, $dwTime) _Timer_KillTimer($formMain, $TimerHandle) $result = SearchImage() Switch $result Case 1 DebugInfo("Message!") Send("{ENTER}") Case 2 DebugInfo("Connection Lost") Send("{ENTER}") Restart() Case 3 DebugInfo("Login or password are incorrect") Send("{ENTER}") Restart() Case Else EndSwitch $TimerHandle = _Timer_SetTimer($formMain, 5000, "_MsgTimerEvent") EndFunc ;==>_MsgTimerEvent Edited June 26, 2008 by Levenson Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 26, 2008 Share Posted June 26, 2008 He everyone. I have note that when i activate a timer( it happens every 5 sec) the main script is slow down. I run a counter in main part and it works longer than 20 sec then it was. Is it normal? Is it works in two threads or the main script paused?It won't be possible to help you without a short script THAT CAN BE RUN, and that SHOWS YOUR ISSUE. The code you provided meets neither requirement. 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 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