Sign in to follow this  
Followers 0
Gnat

Help with Edit fields

6 posts in this topic

Is there a way to use the edit field with the edit style of $ES_WANTRETURN, and then take that text and write it to a text file, so that when you read it back, the @CRLF does not cause the data to be read as multiple lines. Can the @CRLF be replaced by some misc. character when written to the file (FileWriteLine), and then written back when read back from the file (FileReadLine)?

Share this post


Link to post
Share on other sites



Can the @CRLF be replaced by some misc. character when written to the file (FileWriteLine), and then written back when read back from the file (FileReadLine)?

<{POST_SNAPBACK}>

Do you mean?

FileWriteLine($filehandle, StringTrimRight($sMyString, 1))

Then

$sMyString = FileReadLine($filehandle) & @CRLF

Phillip

Share this post


Link to post
Share on other sites

Can the @CRLF be replaced by some misc. character when written to the file (FileWriteLine), and then written back when read back from the file (FileReadLine)?

FileWriteLine($file, StringReplace($line, @CRLF, "~"))

$line = StringReplace(FileReadLine($file), "~", @CRLF)

My UDFs: ExitCodes

Share this post


Link to post
Share on other sites

FileWriteLine($filehandle, StringTrimRight($sMyString, 1))
This would only remove the last @CRLF, not the ones in the middle of the text.

My UDFs: ExitCodes

Share this post


Link to post
Share on other sites

Thank you c0deWorm, that worked perfectly!

Share this post


Link to post
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
Sign in to follow this  
Followers 0