Jump to content
Sign in to follow this  
aa2zz6

How does the Pixel Search Function work?

Recommended Posts

aa2zz6

So I've been playing around is the pixel search function but I don't quite understand how to change the search function to search in a certain area. I'll list the example from the forum below. So if we broke the screen into four halves how could I have the pixel search only search between the two center quarters of the screen. The idea was to minimize the time and usage of searching for a certain pixel. 

; Find a pure red pixel in the range 0,0-20,300
Local $aCoord = PixelSearch(0, 0, 20, 300, 0xFF0000)
If Not @error Then
    MsgBox($MB_SYSTEMMODAL, "", "X and Y are: " & $aCoord[0] & "," & $aCoord[1])
EndIf

Share this post


Link to post
Share on other sites
iamtheky

so you dont understand left, top, right, bottom?  or what exactly about the limited area is the issue?

i thought i understood 'four halves', but i do not understand where the 'center quarters' of four halves would be, which makes me think i dont understand four halves.  using the window info tool and specifying the exact area you are trying to capture with coordinates would be easier than word problems.


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites
Noobiee


Local $coord = PixelSearch(942 [X], 517 [Y], 977 [X], 558[Y],0xBA0714,80[Variance])

 

XY 

_ _ _ _ _ _ 

l                 l

l _ _ _ _ _ _l  XY

The coordinates of the box ...

  • Like 1

Share this post


Link to post
Share on other sites
JLogan3o13

The idea was to minimize the time and usage of searching for a certain pixel. 

My question would be, what application is so difficult to manipulate that you're forced to resort to a pixel search? This function is known for its instability; 99% of the time there is a better way.


√-1 2^3 ∑ π, and it was delicious!

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  

×