Jump to content

Recommended Posts

Posted

i would like to loop it buy i have while statments issues i belive my while 1+1=2 makes it no good but i cant find a way to go back to 6th line automaticaly

ty in advance

Dim $color = PixelGetColor(290, 461)

Dim $red = PixelGetColor(337,626)

Dim $yellow = PixelGetColor(476,577)

while 1+1=2

(while $color = PixelGetColor(290, 461)

wend

sleep (2000)

if $red = PixelGetColor(337,626) Then

MouseClick("left" , 290, 461 , 2 , 20)

MouseClick("left" , 670, 558 , 1 , 20)

else

if $yellow > PixelGetColor(476,577) then

MouseClick("left" , 413, 460 , 1 , 20)

else

MouseClick("left" , 619, 460 , 1 , 20)

endif

endif)

wend

Posted

Maybe:

Dim $color = PixelGetColor(290, 461)
Dim $red = PixelGetColor(337, 626)
Dim $yellow = PixelGetColor(476, 577)

While 1
    While $color = PixelGetColor(290, 461)
        Sleep(100)
    WEnd
    Sleep(2000)
    
    If $red = PixelGetColor(337, 626) Then
        MouseClick("left", 290, 461, 2, 20)
        MouseClick("left", 670, 558, 1, 20)
    Else
        If $yellow > PixelGetColor(476, 577) Then
            MouseClick("left", 413, 460, 1, 20)
        Else
            MouseClick("left", 619, 460, 1, 20)
        EndIf
    EndIf
WEnd

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