andguent Posted April 19, 2005 Posted April 19, 2005 I searched around for a while and could not find the answer to this simple question. I want to append text to the bottom of a GUI input box. I want the new data on a new line. This code below is supposed to add a number every second, on a new line every time. It does add the number, but no new line/carriage return. As you can see, I tried a few different special characters in hopes that one of them would work. Any ideas would be greatly appreciated. #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) ; Change to OnEvent mode $debugwindow = GUICreate("Process Info", 200, 100) $inputMainDisplay = GUICtrlCreateInput("", 10, 10, 180, 80) GUICtrlSetState($inputMainDisplay, $GUI_DISABLE) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") GUISetState(@SW_SHOW) Local $count = 1 While 1 Sleep(1000) ; Idle around GUICtrlSetData($inputMainDisplay, GUICtrlRead($inputMainDisplay) & " " & Chr(11) & @CR & @LF & @CRLF & $count & " ") $count = $count + 1 WEnd Func CLOSEClicked() Exit EndFunc
Developers Jos Posted April 19, 2005 Developers Posted April 19, 2005 #include <GUIConstants.au3> Opt("GUIOnEventMode", 1); Change to OnEvent mode $debugwindow = GUICreate("Process Info", 200, 100) $inputMainDisplay = GUICtrlCreateInput("", 10, 10, 180, 80,$ES_MULTILINE ) GUICtrlSetState($inputMainDisplay, $GUI_DISABLE) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") GUISetState(@SW_SHOW) $count = 1 While 1 Sleep(1000); Idle around GUICtrlSetData($inputMainDisplay, GUICtrlRead($inputMainDisplay) & $count & @CRLF) $count = $count + 1 WEnd Func CLOSEClicked() Exit EndFunc 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.
andguent Posted April 19, 2005 Author Posted April 19, 2005 That works. Thanks again. This forum continues to impress me. I guess I could have tried an edit box instead of an input box too huh.
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