skiffle Posted October 24, 2008 Posted October 24, 2008 Hallo, I try to fill an GUICtrlCreateEdit with data. The command I use is the GUICtrlSetData command, but I don´t know how to make a linefeed. The result should be something like: test test2 test3 If there is any help you can make me smile again. Thanks Skiffle
Skruge Posted October 24, 2008 Posted October 24, 2008 Welcome to the forums.You need a carriage return/linefeed combo, which is represented by the macro @CRLF.GUICtrlSetData($Edit1, "test" & @CRLF & "test2" & @CRLF & @CRLF & "test3")A complete list of macros is listed in the helpfile, or here. [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]
skiffle Posted October 27, 2008 Author Posted October 27, 2008 Sorry, thanks for the ideas, but I use this code: While 1 $line1 = FileReadLine($file1) If @error = -1 Then ExitLoop MsgBox(0, "Line read:", $line1) $line2 = FileReadLine($file1) GUICtrlSetData(-1, $line1 & @CRLF) Wend On each loop the FileReadLine read a new line but GUICtrlSetData just write in the first line. The @CRLF does not work here?? Do you have an idea for this? Regards Skiffle
skiffle Posted October 29, 2008 Author Posted October 29, 2008 Sorry my fault, I did not see the pur fileread function Thanks for all
therks Posted October 29, 2008 Posted October 29, 2008 Sorry my fault, I did not see the pur fileread function Thanks for all Also your first code would work if you set the 3rd parameter in GUICtrlSetData. While 1 $line1 = FileReadLine($file1) If @error = -1 Then ExitLoop MsgBox(0, "Line read:", $line1) $line2 = FileReadLine($file1) GUICtrlSetData(-1, $line1 & @CRLF, 1); <-- Notice this 1. It means don't erase previous contents. Instead, add on to it. Wend My AutoIt Stuff | My Github
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