Falc0 0 Posted June 8, 2004 MouseClick("left", 1018, 133, 20) $var = PixelGetColor( 228 , 223 ) MsgBox(0,"Checking for events.....", $var MouseClick("left", 219, 430, 1) Not sure if the code is right but what I need it to do is check those coordinates and if it returns back white to shut down the bot, but if it comes back a different color return to what it was doing... I've tried looking at the Help File but I can't figure out how to do it. RK-DemonSpawned Share this post Link to post Share on other sites
ezzetabi 3 Posted June 8, 2004 While 1 If PixelGetColor( 228 , 223 ) = 0;White Exit EndIf ;Check what is happening WEnd Share this post Link to post Share on other sites
Falc0 0 Posted June 8, 2004 Thank you very much. RK-DemonSpawned Share this post Link to post Share on other sites
Falc0 0 Posted June 8, 2004 Gah when I try this I get this error If PixelGetColor( 228, 223 )=0;White Error: "If" statements must have a "Then" keyword. Where would I add the "Then" in the code? Note: code is 2 posts above RK-DemonSpawned Share this post Link to post Share on other sites
Jos 2,175 Posted June 8, 2004 Gah when I try this I get this error If PixelGetColor( 228, 223 )=0;White Error: "If" statements must have a "Then" keyword. Where would I add the "Then" in the code? Note: code is 2 posts aboveWhere do you think it should be placed ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
Falc0 0 Posted June 8, 2004 I was thinking before Exit, but I tried that and got the same error. So I am not too sure of where to put it now. RK-DemonSpawned Share this post Link to post Share on other sites
Josbe 1 Posted June 8, 2004 I was thinking before Exit, but I tried that and got the same error.So I am not too sure of where to put it now.If PixelGetColor( 228, 223 )=0 then ;White AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Share this post Link to post Share on other sites
Jos 2,175 Posted June 8, 2004 suggestion: these kind of questions are easily found in the helpfile.....Here's the Cut&Paste for the If statement:If...Then --------------------------------------------------------------------------------Conditionally run a single statement.If <expression> Then statementParametersexpression If the expression is true, the statement is executed. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
Valik 478 Posted June 8, 2004 Where do you think it should be placed ?Damn, I was going to ask that very same question, you beat me to it.Falc0, read the code in English, not as code. Try putting the "Then" where it makes the sentence sound correct. Share this post Link to post Share on other sites
Falc0 0 Posted June 8, 2004 Damn, I was going to ask that very same question, you beat me to it.Falc0, read the code in English, not as code. Try putting the "Then" where it makes the sentence sound correct.Hmm...I see. That actually makes sense to me By the way thanks Josbe RK-DemonSpawned Share this post Link to post Share on other sites