Monty 0 Posted January 21, 2011 Hi all, something very simple...how do you determine when field is selected (where edit is you cursor in)??? Can you please add to example below. #include <GUIConstants.au3> $appnamedata = "GUIName" $gui_main = GUICreate($appnamedata, 400, 250) $edit_1 = GUICtrlCreateEdit("", 10, 10, 300, 100) $edit_2 = GUICtrlCreateEdit("", 10, 120, 300, 100) GUISetState() Do $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete() EndSelect Until Not WinExists($gui_main) Share this post Link to post Share on other sites
Andreik 66 Posted January 21, 2011 Use ControlGetFocus() #include <GUIConstants.au3> $appnamedata = "GUIName" $gui_main = GUICreate($appnamedata, 400, 250) $edit_1 = GUICtrlCreateEdit("", 10, 10, 300, 100) $edit_2 = GUICtrlCreateEdit("", 10, 120, 300, 100) GUISetState() Do $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete() EndSelect TrayTip("Selected",ControlGetFocus($appnamedata),1) Until Not WinExists($gui_main) When the words fail... music speaks Share this post Link to post Share on other sites