Jump to content

Recommended Posts

Posted

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

Posted

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

  • Developers
Posted

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

Where 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.
  :)

Posted

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

  • Developers
Posted

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 statement

Parameters

expression 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.
  :)

Posted

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.

Posted

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 :D

By the way thanks Josbe :huh2:

RK-DemonSpawned

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...