Sign in to follow this  
Followers 0
implite

error parsing function call.

2 posts in this topic

It keeps giving me errors on my wend sleep line. When home key is pressed then errors out.

HotKeySet("{HOME}", "GStart")
HotKeySet("{PAUSE}", "Gpause")
HotKeySet("{ESC}", "Gexit")

While 1
    Sleep(100)
WEnd  ;this is where it is saying the problem is but I don't understand why...

Func Gstart()
    While 1
     $Pixelgray = Ox4A494A
     $Getpixel = PixelGetColor(363, 197)
      If $Getpixel = $Pixelgray Then
       Sleep(300)
       Send("g")
   EndIf
 WEnd
EndFunc   ;==>Gstart



Func Gpause()
    While 1
        Sleep(100)
    WEnd
EndFunc   ;==>Gpause


Func Gexit()
    MsgBox(0, "exit box", "Script exited")
    Exit 0
EndFunc   ;==>Gexit

Share this post


Link to post
Share on other sites



;) This is because you made an endless infinite loop, When you press HOME or PAUSE keys. The loop will continue in your case unless you manually terminated the script. Check-out ExitLoop and ContinueLoop functions in help file.

----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

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  
Followers 0