Jump to content

pixelsearch


LimeSeed
 Share

Recommended Posts

is there any way i can get the coordinates of the top, left, right, and left of my gui and perform a pixel search only in the gui?

or is there any way in general to make it so that a pixel search is only performed within the boundaries of an autoit gui?
global $warming = true
Link to comment
Share on other sites

Get the GUI handle (hwnd) and pass it to PixelSearch() ... see PixelSearch() in the help file and look for the HWND option..

If you know the GUI width and height... PixelSearch(0x7637a5,0,0,$width,$height,1,$hwnd) ... I think ... check the help file.

Lar.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Link to comment
Share on other sites

Use WinGetPos($yourGUIHandle) and you will get an array that contains your window's position. You can then use PixelSearch().

Note that if you try using PixelSearch() with the parameters you used to create your GUI (e.g. you used GUICreate("blah", 500, 400, 50, 80) and then use PixelSearch(50, 80, 50 + 500, 80 + 400)), than that will not include the GUI frame if you are using a frame. Let me know if this second part didn't make sense, I could throw together some pics to explain a lot better.

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Use WinGetPos($yourGUIHandle) and you will get an array that contains your window's position. You can then use PixelSearch().

Note that if you try using PixelSearch() with the parameters you used to create your GUI (e.g. you used GUICreate("blah", 500, 400, 50, 80) and then use PixelSearch(50, 80, 50 + 500, 80 + 400)), than that will not include the GUI frame if you are using a frame. Let me know if this second part didn't make sense, I could throw together some pics to explain a lot better.

i gocha thanks lots!
global $warming = true
Link to comment
Share on other sites

  • 1 month later...

$PotKey = Guictrlread($combo4); potion tuşunu comboda yazan değer olduğunu belirttik.
    $pixelcolor = PixelGetColor(2,2) ; (x,y)
    if $pixelcolor = "0x000000" Then; eğer renk 0x990000 ise bekle, değilse hp tuşuna bas dedik.
    sleep(1)
    else
    Send($PotKey)
    Endif

:)

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