Jump to content

EditBox to FileWriteLine() concern


Recommended Posts

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

 

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

@Subz,

It never put up in my mind using StringReplace():sweating:, it worked. Thank you so much, another lesson learn for me.

Edited 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...