Jump to content

Recommended Posts

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
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
EndFunc   ;==>Gstart

Func Gpause()
    While 1
EndFunc   ;==>Gpause

Func Gexit()
    MsgBox(0, "exit box", "Script exited")
    Exit 0
EndFunc   ;==>Gexit
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

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...