Jump to content
Sign in to follow this  
tobject

timer blows up on lock

Recommended Posts

tobject

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

Share this post


Link to post
Share on other sites
PsaltyDS

Put the declaration at the top of your script. You are stuck in the While/WEnd loop before the declaration happens.

:blink:


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

Share this post


Link to post
Share on other sites
tobject

Thanks, I keep forgetting it's not Delphi/Pascal :blink:

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×