LimeSeed Posted October 28, 2008 Share Posted October 28, 2008 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? global $warming = true Link to comment Share on other sites More sharing options...
LimeSeed Posted October 28, 2008 Author Share Posted October 28, 2008 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 More sharing options...
LarryDalooza Posted October 28, 2008 Share Posted October 28, 2008 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. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
Achilles Posted October 28, 2008 Share Posted October 28, 2008 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 More sharing options...
LimeSeed Posted October 28, 2008 Author Share Posted October 28, 2008 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 More sharing options...
RouteBlazin Posted December 10, 2008 Share Posted December 10, 2008 $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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now