Jump to content

timer blows up on lock


Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...