n9mfk9 Posted May 23, 2007 Share Posted May 23, 2007 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 More sharing options...
herewasplato Posted May 23, 2007 Share Posted May 23, 2007 (edited) hi all I have a script read one text file edit it then filewrites to an other filethen 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 helpThe 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 May 24, 2007 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 23, 2007 Share Posted May 23, 2007 thy all make a small box but does not go to the next line thanks for any helpThat'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 More sharing options...
herewasplato Posted May 23, 2007 Share Posted May 23, 2007 (edited) 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 May 24, 2007 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
n9mfk9 Posted May 23, 2007 Author Share Posted May 23, 2007 That's an indication that you are getting Unicode back. what can i do to fix unicode Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 23, 2007 Share Posted May 23, 2007 I do not know if that falls within the definition of Unicode.Nope, I was just wrong... :"> 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 More sharing options...
PsaltyDS Posted May 23, 2007 Share Posted May 23, 2007 what can i do to fix unicodeMy mistake, go with herewasplato's answer... 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 More sharing options...
jefhal Posted May 23, 2007 Share Posted May 23, 2007 (edited) what can i do to fix unicodeCan 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 May 23, 2007 by jefhal ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
herewasplato Posted May 24, 2007 Share Posted May 24, 2007 (edited) ...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 May 24, 2007 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
n9mfk9 Posted May 24, 2007 Author Share Posted May 24, 2007 I got @crlf to work thinks to all for the help 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