# Find Color Spiral

## Recommended Posts

How do you do a spiral pixel color search in specified coordinates? I want it to search in this square and then if it's only black, do one thing. If it's anything besides black, do another thing. Can anyone help? Thanks

##### Share on other sites

How do you do a spiral pixel color search in specified coordinates? I want it to search in this square and then if it's only black, do one thing. If it's anything besides black, do another thing. Can anyone help? Thanks

Lookup PixelSearch in the help files.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

##### Share on other sites

How do you do a spiral pixel color search in specified coordinates? I want it to search in this square and then if it's only black, do one thing. If it's anything besides black, do another thing. Can anyone help? Thanks

Could you elaborate on the "spiral" ?

If it's just the square, using the square coords of top left x and y to bottom right x and y you could do:

```Opt("PixelCoordMode", 0); check help if you need to change the 0 to 1 or 2

\$TOPx = 0
\$TOPy = 0; Starting points
\$BOTTOMx = 100
\$BOTTOMy = 100; Ending points
\$COLOR_BLACK = 0X000000

\$Pix = PixelSearch(\$TOPx, \$TOPy, \$BOTTOMx, \$BOTTOMy, \$COLOR_BLACK)

If \$Pix <> 1 Then
; Do something
EndIf```

This doesn't go in a "spiral" search though, but top to bottom and left to right (I think )...

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

##### Share on other sites

I think that your best bet would be to control the "spiralling" behavior yourself.

In other words, restrict your pixelsearch 'window' to a very small block, and then

move the origin of said block in the pattern you want using the proper math to

represent the pattern.

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

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