Jump to content
Sign in to follow this  
supadodger

search for a pixel but only click it at its lowest spot

Recommended Posts

supadodger

i want to click the very bottom of this pixel

here is my code and it clicks the first spot it finds i want the lowest spot on the screen

$loot = PixelSearch(251, 222, 800, 634, 0xF8D02F, 5)
            
            If IsArray($loot) = 1 Then
                                MouseMove($loot[0] , $loot[1] , 0)
                                MouseClick("left")
MouseClick("left")
Edited by supadodger

Share this post


Link to post
Share on other sites
PsaltyDS

You can either save the result from PixelSearch() and then do it again for just the remaining area to see if there is one lower...

OR

Code your own loop to PixelSearch() one line at a time working backwards up from the bottom row you are interested in...

OR

If you need both lowest row and right-most location, code your own search with a loop using PixelGetColor() that searches right-to-left, bottom-to-top.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
SmOke_N

http://www.autoitscript.com/forum/index.ph...st&p=266683

Just click the last x and y element found.


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

×