Falc0 Posted June 8, 2004 Share 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 Link to comment Share on other sites More sharing options...
ezzetabi Posted June 8, 2004 Share Posted June 8, 2004 While 1 If PixelGetColor( 228 , 223 ) = 0;White Exit EndIf ;Check what is happening WEnd Link to comment Share on other sites More sharing options...
Falc0 Posted June 8, 2004 Author Share Posted June 8, 2004 Thank you very much. RK-DemonSpawned Link to comment Share on other sites More sharing options...
Falc0 Posted June 8, 2004 Author Share 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 Link to comment Share on other sites More sharing options...
Developers Jos Posted June 8, 2004 Developers Share 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. Link to comment Share on other sites More sharing options...
Falc0 Posted June 8, 2004 Author Share 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 Link to comment Share on other sites More sharing options...
Josbe Posted June 8, 2004 Share 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 Link to comment Share on other sites More sharing options...
Developers Jos Posted June 8, 2004 Developers Share 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. Link to comment Share on other sites More sharing options...
Valik Posted June 8, 2004 Share 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. Link to comment Share on other sites More sharing options...
Falc0 Posted June 8, 2004 Author Share 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 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