Jump to content

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


Recommended Posts

Posted (edited)

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? :o

ty

Edited by amakrkr
Posted (edited)

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? :o

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

Posted

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 )

Posted

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

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...