Snook Posted January 9, 2007 Share Posted January 9, 2007 (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 January 9, 2007 by Snook Link to comment Share on other sites More sharing options...
NeoFoX Posted January 9, 2007 Share Posted January 9, 2007 This: $color = PixelGetColor(826,632) If $color = 16777215 Then MouseClick("left") Else MsgBox(4096, "Test", "Color not found, quiting in 5 secs",5) EndIf ?? Neo [center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center] Link to comment Share on other sites More sharing options...
Snook Posted January 9, 2007 Author Share Posted January 9, 2007 Yes thanks Link to comment Share on other sites More sharing options...
jvanegmond Posted January 9, 2007 Share Posted January 9, 2007 MouseMove(826,642) $color = PixelGetColor(826,632) If $color = 0xFFFFFF Then MouseClick("left") Else MsgBox(4096, "Test", "This box will time out in 10 seconds", 10) Exit EndIf github.com/jvanegmond Link to comment Share on other sites More sharing options...
NeoFoX Posted January 9, 2007 Share Posted January 9, 2007 @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... Neo [center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center] Link to comment Share on other sites More sharing options...
jvanegmond Posted January 9, 2007 Share Posted January 9, 2007 (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 January 9, 2007 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now