tymo93 Posted March 10, 2012 Share Posted March 10, 2012 I am trying to get Mouse Pos inside my GUI program and I cannot seem to figure it out. Once the my app is handle I want to use ControlClick with coordinates. How do I get handle of my parent GUI? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 10, 2012 Moderators Share Posted March 10, 2012 tymo93, How do I get handle of my parent GUI?It is returned by GUICreate: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) GUISetState() MsgBox(0, "GUI Handle", $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
benydc Posted March 10, 2012 Share Posted March 10, 2012 Okay, I did that but I still cannot get the right pixel I want with Local $var = PixelGetColor(106, 93, $hGUI). Yes my $hGUI is assinged for GUICreate, but my GUI window should have her own x, y coordinates which start from left top corner and I think the PixelGetColor does not detect my GUI window, it always finds on full desktop.. or is even possible to get pixel color inside my GUI window? Suggestion? :-? Link to comment Share on other sites More sharing options...
benydc Posted March 11, 2012 Share Posted March 11, 2012 Ahggg.. this gives me headaches.. I searched and saw one of the posts of yours Melba23 :-? A similar script but a bit messy, where it detects the background color and text color. What if I create a second GUI, child, and then trying to attach from parent PixelGetColor to child GUI window? Link to comment Share on other sites More sharing options...
pieeater Posted March 11, 2012 Share Posted March 11, 2012 try adding this to the top of your code: Opt('MouseCoordMode', 0) [spoiler]My UDFs: Login UDF[/spoiler] Link to comment Share on other sites More sharing options...
benydc Posted March 11, 2012 Share Posted March 11, 2012 Thanks! Seems like is working good so far, its just that with AutoIT Window Info I cannot get my X, Y coordinates for GUI Window, they are not showing in the ControlClick Field. :-( Link to comment Share on other sites More sharing options...
benydc Posted March 11, 2012 Share Posted March 11, 2012 (edited) I got it! I played a bit with AutoIT Window Info and figured it out I had to set the Mode option to Window and then check the x, y coordinates on Mouse Tab hehehe :D/ I LOVE AUTO IT ! Far more better and C++ !! Edited March 11, 2012 by benydc Link to comment Share on other sites More sharing options...
benydc Posted March 11, 2012 Share Posted March 11, 2012 Thanks Melba23 & pieeater For helping me ! Case Solved 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