Jump to content

Neverending cycle, but why?


Recommended Posts

Hello all!

I made this script:

Global $k = 1
Global $check = 1
Global $coord = 0
If $k = 1 Then;Kék csillagok keresése
   do
      $coord = PixelSearch(0,0,512,768,0x00B0E5)
         if not @error then
            $check = PixelGetColor($coord[0],$coord[1],0)
               If $check = 0x00B0E5 Then
                    MouseMove($coord[0],$coord[1], 0)
                    Sleep(100)
                    MouseClick("Left")
                    Sleep(100)
                    MouseClick("Right")
                    Sleep(100)
                    MouseMove($coord[0]+30,$coord[1]+10, 0)
                    Sleep(100)
                    MouseClick("Left")
                    $k = 2
               EndIf
         EndIf
   Until $k = 1
EndIf

When i run the script its going into a neverending cycle and the mouse is going and clicking and going and clicking...etc. but why? I want to made this only once, not for years :] please help me, thanks^^

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...