Jump to content

Help With Get Color


Snook
 Share

Recommended Posts

Ok wanting to do this move mouse to a spot then check for that color and if its not that color a message box comes up and exits the script here what I have so far

MouseMove(826,642)
    $color = PixelGetColor(826,632)
    If $color = 0xFFFFFF Then MouseClick("left")

This works but I want to add the other stuff and lost about how to do so read the help found the msgbox

MsgBox(4096, "Test", "This box will time out in 10 seconds", 10)

and use exit of course to exit but how to combine all that gots me elseif else this tried a few things just couldnt get it

Edited by Snook
Link to comment
Share on other sites

I know the exit is not necessary in this script, but both the fact that he had already indented his code and he specifically said he wanted to exit made me think that was going to put it inside a loop. As far as the decimal value, AutoIt can handle that.

If 0xFFFFFF = 16777215 Then
    MsgBox(0, "", "True")
Else
    MsgBox(0, "", "false")
EndIf

Gives a message box with the text "True".

Edited by Manadar
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...