Find Control...Please Help !
#1
Posted 12 May 2011 - 06:03 PM
Thank You
#2
Posted 12 May 2011 - 07:42 PM
To what end?
If you want to action the control using ControlClick then you can already define the control using the coordinates as a parameter. Look at <Using Autoit - Controls> in the Help file to see how.
M23
Toast - Small GUIs which pop out of the Systray - Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command - GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI - NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure - - Notify - Small notifications on the edge of the display
RecFileListToArray - An alternative to _FileListToArray with user-defined include/exclude masks, maximum recursion level, sorting and displayed path options
GUIListViewEx - Insert, delete, move, drag and sort ListView items
#3
Posted 12 May 2011 - 08:28 PM
$hButton = ControlGetHandle($hGUI, "", "[X:100; Y:100]")
Note that works with the coordinate OF THE CONTROL, not just any coordinate in the control.
To find the control by giving an X/Y coordinate somewhere within it, look for use of WindowFromPoint function, but that uses screen relative coordinates:
#include <GuiConstantsEx.au3> Global $hGUI, $idButton, $hButton $hGUI = GUICreate("Test", 300, 300) $idButton = GUICtrlCreateButton("TEST", 100, 100, 100, 100) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $idButton $hButton = ControlGetHandle($hGUI, "", "[X:100; Y:100]") ConsoleWrite("$idButton = " & $idButton & "; $hButton = " & $hButton & @LF) Case Else $avMousePos = MouseGetPos() $avWinFrmPt = DllCall("user32.dll", "hwnd", "WindowFromPoint", "int", $avMousePos[0], "int", $avMousePos[1]) $hWinFrmPt = $avWinFrmPt[0] ToolTip("HWND = " & $hWinFrmPt & @LF & "X = " & $avMousePos[0] & "; Y = " & $avMousePos[1]) EndSwitch WEnd
#4
Posted 13 May 2011 - 11:01 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users




