tobject Posted July 3, 2010 Posted July 3, 2010 How do I do a lock on timer? currently I get and I declared $NotLocked as Global H:\SendTwitts.au3 (104) : ==> Variable used without being declared.: if $NotLocked then if ^ ERROR without lock it works fine, 20 seconds is probably ok but who knows $MyTimerID3=_Timer_SetTimer(0,$Sec20,"SendQueueTwittsTimer"); while 1 sleep(250); wend; Global $NotLocked=True; Func SendQueueTwittsTimer($hWnd, $Msg, $iIDTimer, $dwTime) #forceref $hWnd, $Msg, $iIDTimer, $dwTime, $NotLocked if $NotLocked then $NotLocked=False; SendTwittFromQueue(); $NotLocked=True; endif; EndFunc
PsaltyDS Posted July 3, 2010 Posted July 3, 2010 Put the declaration at the top of your script. You are stuck in the While/WEnd loop before the declaration happens. 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
tobject Posted July 3, 2010 Author Posted July 3, 2010 Thanks, I keep forgetting it's not Delphi/Pascal
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