Monty Posted January 21, 2011 Share 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) Link to comment Share on other sites More sharing options...
Andreik Posted January 21, 2011 Share 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. Link to comment Share on other sites More sharing options...
Monty Posted January 21, 2011 Author Share Posted January 21, 2011 Thank you 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