KickStarter15 Posted April 29, 2017 Share Posted April 29, 2017 Hi Experts, I know this is just a small issue for guys out there but can't find how to fix this. My problem is, when I added text in EditBox with more than one paragraph (I mean not in one line text), FileWriteLine() won't present it as one line when "GUICtrlRead($Edit)" even if using delimiters "|". I have here the code: $file = "D:\Programs\Text.ini" FileWriteLine($file, GUICtrlRead($InputName)&"|"&GUICtrlRead($Count)&"|"&$AllFormat&"|"&GUICtrlRead($Edit)&"|"&@UserName&"|"&$aFormat&"|"&@MON & "/" & @MDAY & "/" & @YEAR&"|"&@HOUR & ":" & @MIN & ":" & @SEC&"|"&$Status&"|"&$Remark) EditBox text presented as: This is just a sample text. This is another text here. Last text here. FileWriteLine() output is this: ABZ12345|50|Parsing| This is just a sample text. This is another text here. Last text here.|@username|Others|@MON/@MDAY/@YEAR|@HOUR:@MIN:@SEC|Pending|For Fixing The bold font were the one being separated to another line in $file which should be in one line only. Like below: ABZ12345|50|Parsing|This is just a sample text. This is another text here. Last text here.|@username|Others|@MON/@MDAY/@YEAR|@HOUR:@MIN:@SEC|Pending|For Fixing Any idea guys? Thanks in advance Experts. KS15 Skysnake 1 Programming is "To make it so simple that there are obviously no deficiencies" or "To make it so complicated that there are no obvious deficiencies" by C.A.R. Hoare. Link to comment Share on other sites More sharing options...
Subz Posted April 29, 2017 Share Posted April 29, 2017 Use StringReplace(GuiCtrlRead($InputName), @CRLF, " ") or replace it with something indicating the newline. Skysnake 1 Link to comment Share on other sites More sharing options...
KickStarter15 Posted May 1, 2017 Author Share Posted May 1, 2017 (edited) @Subz, It never put up in my mind using StringReplace(), it worked. Thank you so much, another lesson learn for me. Edited May 1, 2017 by KickStarter15 Programming is "To make it so simple that there are obviously no deficiencies" or "To make it so complicated that there are no obvious deficiencies" by C.A.R. Hoare. 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