E1M1 Posted June 7, 2009 Share Posted June 7, 2009 How do I get cursor's X and Y location on Edit1 control? I want display pos on msgbox #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 203, 146, 193, 125) $Edit1 = GUICtrlCreateEdit("", 8, 8, 185, 89) GUICtrlSetData(-1, "Edit1") $Button1 = GUICtrlCreateButton("get coords", 32, 112, 75, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(0,"Line:","Char:") EndSwitch WEnd edited Link to comment Share on other sites More sharing options...
JackDinn Posted June 7, 2009 Share Posted June 7, 2009 #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 203, 146, 193, 125) $Edit1 = GUICtrlCreateEdit("", 8, 8, 185, 89) GUICtrlSetData(-1, "Edit1") $Button1 = GUICtrlCreateButton("get coords", 32, 112, 75, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $line = ControlCommand($Form1, "", $Edit1, "GetCurrentLine", "") $char = ControlCommand($Form1, "", $Edit1, "GetCurrentCol", "") MsgBox(0, "test", "Line:" & $line & @CRLF & "Char:" & $char) EndSwitch WEnd maybe. Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
E1M1 Posted June 7, 2009 Author Share Posted June 7, 2009 thanks, It's exactly what I need edited 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