Sign in to follow this  
Followers 0
amakrkr

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

7 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



#2 ·  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


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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 this post


Link to post
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 this post


Link to post
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


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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 this post


Link to post
Share on other sites

ty all (Valuater nice script wery helpfull :o )

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

Share this post


Link to post
Share on other sites

ty all (Valuater nice script wery helpfull :o )

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

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

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0