Jump to content
Sign in to follow this  
wazze

Neverending cycle, but why?

Recommended Posts

wazze

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

Share this post


Link to post
Share on other sites
wazze

oh thanks :]

i am new in this language, and which i use going until the value = 1 thanks again :]

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  

×