Lej Posted November 26, 2006 Posted November 26, 2006 (edited) So I have a simple GUI with a Edit. I add some lines to it with a loop For $y = 0 to 3 Step 1 For $x = 0 to 3 Step 1 GUICtrlSetData($TextBox, GUICtrlRead($TextBox) & @CRLF & $x & "," & $y) Next Next Works fine. Creates something like this: 0,0 1,0 2,0 3,0 0,1 1,1 2,1 3,1 0,2 1,2 2,2 3,2 0,3 1,3 2,3 3,3 Now how do I go about clearing the editbox of all text in it? Edited November 26, 2006 by Lej
Developers Jos Posted November 26, 2006 Developers Posted November 26, 2006 Now how do I go about clearing the editbox of all text in it? GUICtrlSetData($TextBox,"") 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.
Lej Posted November 26, 2006 Author Posted November 26, 2006 Thanks! Stupid me had entered " " instead of "". Another question if you don't mind. How to split the text in $TextBox so I get an array with one line per element. I tried $lines = StringSplit(GUICtrlRead($TextBox), '\n') But it doesn't seem to be working :/
Developers Jos Posted November 26, 2006 Developers Posted November 26, 2006 Thanks! Stupid me had entered " " instead of "".Another question if you don't mind. How to split the text in $TextBox so I get an array with one line per element. I tried$lines = StringSplit(GUICtrlRead($TextBox), '\n')But it doesn't seem to be working :/replace "\n" with @LF 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.
Helge Posted November 26, 2006 Posted November 26, 2006 @JdeB : doesn't CR and LF in editboxes only display does little square boxes,meaning you have to use CRLF instead ? Also, then the third parameter forStringSplit would have to be set to 1. Something like this then I believe :$lines = StringSplit(GUICtrlRead($edit), @CRLF, 1)
Developers Jos Posted November 26, 2006 Developers Posted November 26, 2006 @JdeB : doesn't CR and LF in editboxes only display does little square boxes, meaning you have to use CRLF instead ? Also, then the third parameter for StringSplit would have to be set to 1. Something like this then I believe : $lines = StringSplit(GUICtrlRead($edit), @CRLF, 1) You could be right ... i never know and always need to test .. But the SpringSplit() will work, you will only end up with an @cr at the end of each entry . I always assume the OP has some knowledge and can sort these things out themselves ... 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.
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