# How could I?

## Recommended Posts

Hello,

I was wondering if doing this is possible.

I want to do:

PixelGetColor( X , X )

And if the pixel colorcomes back as 0x5A0000 I would like it to send("1") How would I do this?

##### Share on other sites

`If PixelGetColor ( x , y ) = 0x5A0000 Then send("1"); change x & y for real coordinates`

Agreement is not necessary - thinking for one's self is!

##### Share on other sites

```Do
\$Loop = 1
\$Color = PixelGetColor(x, y)
If \$Color = Dec(0x5A0000) Then
Send("1")
\$Loop = 0
EndIf
Until \$Loop = 0```

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Thanks:D

##### Share on other sites
```Do
\$Loop = 1
\$Color = PixelGetColor(x, y)
If \$Color = Dec(0x5A0000) Then
Send("1")
\$Loop = 0
EndIf
Until \$Loop = 0```

SciTE4AutoIt3 Full installer Download page Â  -Â Beta filesÂ  Â  Â  Â  Â  Â
Â
Live for the present,
Dream of the future,
Learn from the past.
Â

##### Share on other sites

This version does the same as your version... just for comparison

```Do
Sleep(10)
Until PixelGetColor(\$x, \$y) = 0x5A0000
Send("1")```
I think, I overthink. Lol, I try to get something simple, then, end up making it the worst way.

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

##### Share on other sites

To put it on a endless loop would I just:

```While 1
\$x = 76
\$y = 462

Do
Sleep(10)
Until PixelGetColor(\$x, \$y) = 0x8C7D52
Send("1")
Wend```

##### Share on other sites

```\$x = 76
\$y = 462

While 1
If PixelGetColor(\$x, \$y) = 0x8C7D52 Then Send("1")
WEnd```

Edited by AzKay

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

##### Share on other sites

Thanks so much, problem resolved.

## Create an account

Register a new account

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...