faldo Posted October 15, 2006 Share Posted October 15, 2006 (edited) I'm useing GUICtrlCreateEdit () with "$ES_MULTILINE" as style to create an editbox in a GUI. But when i use GUICtrlRead() to get the message in the box, the string i get in return has some kind of hidden line feed control i can't get rid of. The reason i want to remove the line feed is that i want to put the string into a ini file that don't support line feeds. Is there a way to remove the line feed or somehow change the @CRLF to some other character? Please help Edited October 15, 2006 by faldo Check out my other scripts: RDP antihammer/blacklist generator | Phemex cryptocurrency exchange API Link to comment Share on other sites More sharing options...
Developers Jos Posted October 15, 2006 Developers Share Posted October 15, 2006 I'm useing GUICtrlCreateEdit () with "$ES_MULTILINE" as style to create an editbox in a GUI. But when i use GUICtrlRead() to get the message in the box, the string i get in return has some kind of hidden line feed control i can't get rid of. The reason i want to remove the line feed is that i want to put the string into a ini file that don't support line feeds. Is there a way to remove the line feed or somehow change the @CRLF to some other character? Please help $yourstring = StringReplace($yourstring,@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. Link to comment Share on other sites More sharing options...
faldo Posted October 15, 2006 Author Share Posted October 15, 2006 $yourstring = StringReplace($yourstring,@lf,"")oÝ÷ Ûú®¢×¢ØZµÚ²}ý¶ÇÚ0¢¹µ©eêÞßÛ0«bv'ZºÚ"µÍÚ[ÛYH ÑÕRPÛÛÝ[Ë]LÉÝÂÕRPÜX]J ][ÝÓ^HÕRHY] ][ÝÊBÌÍÛ^YY]QÕRPÝÜX]QY] ][ÝÑÝ[I][ÝÉ[ÈÔLÌLKMË ÌÍÑT×ÐUUÕÐÔÓ ÉÌÍÑT×ÓUSSSJÉÌÍÑT×ÕÐSUTBÕRPÝÙ]]H ÌÍÛ^YY] ][ÝÔÙXÛÛ[I][ÝËJBÌÍÐÚXÚÈHÕRPÝÜX]P]Û ][ÝÈÚXÚÈ ][ÝË LÌ LJBÕRTÙ]Ý]H BÚ[HBIÌÍÛÙÈHÕRQÙ]ÙÊ BRY ÌÍÛÙÈH ÌÍÐÚXÚÈ[ÙÐÞ ][ÝÑÙ]Ý[ÈÛHY]Þ ][ÝËÝ[ÔXÙJÕRPÝXY ÌÍÛ^YY] K ][ÝÉ][ÝÊJBRY ÌÍÛÙÈH ÌÍÑÕRWÑUSÐÓÔÑH[^]ÛÜÙ[ The string still shows up as two lines Check out my other scripts: RDP antihammer/blacklist generator | Phemex cryptocurrency exchange API Link to comment Share on other sites More sharing options...
GaryFrost Posted October 15, 2006 Share Posted October 15, 2006 #include <GUIConstants.au3> GUICreate("My GUI edit") $myedit=GUICtrlCreateEdit ("First line"& @CRLF, 10,32,121,97,$ES_AUTOVSCROLL+$ES_MULTILINE+$ES_WANTRETURN) GUICtrlSetData ($myedit, "Second line",1) $Check = GUICtrlCreateButton(" Check ", 50, 320, 50, 25) GUISetState () While 1 $msg = GUIGetMsg() If $msg = $Check then MsgBox(0, "Get string from Editbox", StringReplace(GUICtrlRead($myedit),@CRLF,"")) If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
MHz Posted October 16, 2006 Share Posted October 16, 2006 (edited) Is there a way to remove the line feed or somehow change the @CRLF to some other character?Please help evaluates to...Is there a way to remove the @LF or somehow change the @CRLF to some other character?so JdeB got the 1st request correct. Seems like you should have requested only the @CRLF (carriage return and the line feed) to be removed for your expectation. Edited October 16, 2006 by MHz Link to comment Share on other sites More sharing options...
faldo Posted October 16, 2006 Author Share Posted October 16, 2006 (edited) Sorry i made it abit unclear, the @CRLF in my example had nothing to with my question... The real question was what kind of line feed the style "$ES_MULTILINE" returned when you changed line... and @CRLF was the answer, thanx alot guys. Edited October 16, 2006 by faldo Check out my other scripts: RDP antihammer/blacklist generator | Phemex cryptocurrency exchange API 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