Jump to content

@cr?


Recommended Posts

hi all I have a script read one text file edit it then filewrites to an other file

then the output opens in notepad my question is what command be used as part of a string to make notepad go the the next line I have tried @cr @LF @crlf chr(13) chr(013)

thy all make a small box but does not go to the next line

thanks for any help

Link to comment
Share on other sites

hi all I have a script read one text file edit it then filewrites to an other file

then the output opens in notepad my question is what command be used as part of a string to make notepad go the the next line I have tried @cr @LF @crlf chr(13) chr(013)

thy all make a small box but does not go to the next line

thanks for any help

The end result should be a @CRLF for most Windows based software. Open the file that your script is making using SciTE, then select View > End of Line. That will let you see what is at the end of each line. EDIT: that should let you see what those little boxes are that you now see within notepad - if they are CRs or LFs. Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

thy all make a small box but does not go to the next line

thanks for any help

That's an indication that you are getting Unicode back.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

That's an indication that you are getting Unicode back.

:)

Notepad displays a rectangle in place of non-printable characters.

A CR without a LF is a non-printable character.

A LF without a CR is a non-printable character.

I do not know if that falls within the definition of Unicode.

FileOpen("test.txt", 2)
FileWrite("test.txt", _
        "carriage return" _
         & @CR & @CR & @CR & _
        "carriage return" & @CRLF)
FileWriteLine("test.txt", "FileWriteLine")
FileWriteLine("test.txt", "FileWriteLine")
FileWriteLine("test.txt", "FileWriteLine")
FileWrite("test.txt", _
        "line feed" _
         & @LF & @LF & @LF & _
        "line feed" & @CRLF)
FileClose("test.txt")
ShellExecute("test.txt")
Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

what can i do to fix unicode

Can you just send a keystroke "ENTER" using SEND? ftm:

Send

--------------------------------------------------------------------------------

Sends simulated keystrokes to the active window.

Send ( "keys" [, flag] )

P.S. Notepad is so weird. Often times it puts extra carriage returns into data that I paste in. Sometimes it puts the squares. If I use PSPAD or SCITE, this never happens. Of course, Unix, Macs, and Windows PC's will never agree on anything, so we have to deal with the garbage cleanup... :) Edited by jefhal
...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
Link to comment
Share on other sites

...I have a script read one text file edit it then filewrites to an other file...

Can you post a sample script that replicates the issue?

...I have tried @cr @LF @crlf...

Adding @CRLF should have added a line return as shown by notepad. There may still be unprintable characters at the end of a line - but you should have a "hard return" caused by the CRLF as far as notepad is concerned.

Also, what did SciTE show you when you looked at the file that your script makes? (See my earlier post - I hope that I clarified what I said about SciTE.)

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

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...