Sign in to follow this  
Followers 0
jonathan2133

If statments cancel out Do statment

4 posts in this topic

do

sleep("100")

$var = PixelGetColor( 55 , 104 )

$ok = Pidelgetcolor( 541, 429)

If $ok = 15526360 then

mouseclick("left", 541, 429)

Else

send("1")

end if

until $var > 3238597

thats the code im working with. it returns the error until with no do statment. WTF i have a do statment! And if i take out the if statment it works fine. What am i doing wrong?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

end if should be EndIf

Edit:

Pidelgetcolor should be PixelGetColor

Edit 2:

Until $var > 3238597

Shoul probably be Until $var <> 3238597

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

end if

should be:

EndIf

with no spaces.

Do
    Sleep(100)
    If PixelGetColor(541, 429) = 0xECE9D8 Then
        MouseClick('', 541, 429)
    Else
        Send('1')
    EndIf
Until PixelGetColor(55, 104) > 0x316AC5

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