# PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )

## Recommended Posts

Hello

can someone explain those parameters of the function to me plz?

I dont get it whats left,right,top,bottom.....

for example does function search within a square for certain pixel like this?

............(top?)

......... A******B

...(left?)******* (right?)

...........*******

..........C******D

..........(bottom?)

but problem is i dont know what coor to take because A(X,Y),B(X,Y),C(X,Y) and D(X,Y)

and lets say A(10,40), B(50,40),C(10,80) and D(50, 80)

What now? Which number u take for top or left etc?

ty

Edited by amakrkr
##### Share on other sites

Hello

can someone explain those parameters of the function to me plz?

I dont get it whats left,right,top,bottom.....

for example does function search within a square for certain pixel like this?

............(top?)

......... A******B

...(left?)******* (right?)

...........*******

..........C******D

..........(bottom?)

but problem is i dont know what coor to take because A(X,Y),B(X,Y),C(X,Y) and D(X,Y)

and lets say A(10,40), B(50,40),C(10,80) and D(50, 80)

What now? Which number u take for top or left etc?

ty

```\$coord = PixelSearch( 10, 40, 50, 80, 0xFF0000, 10 )
If Not @error Then
MsgBox(0, "X and Y are:", \$coord[0] & "," & \$coord[1])
EndIf```

You are correct in the way it searches but you only specify points A & D.

Edited by BigDod

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

ty....

but i still cant get it to work

what i wana do is to check certain area for color change (its hp bar in one of the games), so i want to do "if not red (thats the hex for red0x8080ff right?) send("q") but its not working .....

i dunt know where the problem is i put that "shade variation" parameter from 1 to 50 and it doesnt help....i still think there is a problem in coordinates

I mean u dunt have to move mouse to certain coord or something its enuf to just write "\$coord = PixelSearch( 0, 0, 20, 300, 0xFF0000 )

(example from auto it help)" , or should u put first like "MouseMove (x,y)?

i hope i made it clear enuf what i wana do..

ty )

##### Share on other sites

what i wana do is to check certain area for color change (its hp bar in one of the games), so i want to do "if not red (thats the hex for red0x8080ff right?) send("q") but its not working .....

The hex for red is 0xFF0000

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

ty all (Valuater nice script wery helpfull )

but i think that colour detection doesnt work in this game, but thx anyway

##### Share on other sites

ty all (Valuater nice script wery helpfull )

but i think that colour detection doesnt work in this game, but thx anyway

it wont at least "GET" the color for you???

8)

## Create an account

Register a new account

• ### Recently Browsing   0 members

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
×
• Create New...