Sign in to follow this  
Followers 0
Snook

Help With Get Color

6 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



Yes thanks

Share this post


Link to post
Share on other sites

@Manadar: Mousemove and Exit aren`t necessary, I thought.. and isn`t PixelGetColor returning a Decimal vallue, then you should use hex($color)

Or am I wrong... :P

Neo


[center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

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