autoitxp Posted March 20, 2018 Share Posted March 20, 2018 #include <GUIConstantsEx.au3> #include <GuiEdit.au3> #include <WinAPIConv.au3> #include <WindowsConstants.au3> Global $g_hEdit OnAutoItExitRegister("_OnExit") Example() Func Example() Local $hGUI $hGUI = GUICreate("Edit Create", 400, 300) $g_hEdit = _GUICtrlEdit_Create($hGUI, "This is a test" & @CRLF & "Another Line", 2, 2, 394, 268) GUISetState(@SW_SHOW) _GUICtrlEdit_AppendText($g_hEdit, @CRLF & "Append to the end?") Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Func _OnExit() MsgBox(0, '' , _GUICtrlEdit_GetText( $g_hEdit)) EndFunc I'm using windows 10 _OnExit function _GuictrlEdit_GetText() getting empty string ? what is issue ? Link to comment Share on other sites More sharing options...
Developers Jos Posted March 20, 2018 Developers Share Posted March 20, 2018 How do you exit the script? In case you exit it by a GUI_EVENT_CLOSE event it makes sense as you first do a GUIDelete()! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
autoitxp Posted March 20, 2018 Author Share Posted March 20, 2018 Thanks for correction 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