Jump to content

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


Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...