nounourson Posted April 4, 2006 Share Posted April 4, 2006 (edited) Hello all, With a loop, I write several lines in a txt file. For each step of my loop, I'd like the lines to be one over the other, like : Line 1 Line 2 Line 3... But, when I use @CR or Char(13), I just have 1 line with sentences separated with a kind of empty rectangle, like Line 1[]Line2[]Line3... I'm pretty sure it's a problem of character encoding. Could someone help me ? I've read the help file, but found nothing. Thx in advance Edited April 4, 2006 by nounourson Link to comment Share on other sites More sharing options...
Developers Jos Posted April 4, 2006 Developers Share Posted April 4, 2006 Hello all, With a loop, I write several lines in a txt file. For each step of my loop, I'd like the lines to be one over the other, like : Line 1 Line 2 Line 3... But, when I use @CR or Char(13), I just have 1 line with sentences separated with a kind of empty rectangle, like Line 1[]Line2[]Line3... I'm pretty sure it's a problem of character encoding. Could someone help me ? I've read the help file, but found nothing. Thx in advance Are you using FileWriteLine() or FileWrite() ? You probably want to use @CRLF for newline. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 4, 2006 Moderators Share Posted April 4, 2006 (edited) @CRLF Edit: JDeb beat me!! (Nyquil NightTime in the day... ) Edited April 4, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
nounourson Posted April 4, 2006 Author Share Posted April 4, 2006 (edited) Are you using FileWriteLine() or FileWrite() ? You probably want to use @CRLF for newline. [EDIT] You're too fast guys... Anyway, works well with @CRLF, thx a lot for such quick answers ! ___________________________________ That was a fast answer, thanks! I use that : $output=$output&"Mytexte"&@CR and at the end : FileWrite(@SCRIPTDIR & "\Myfile.txt",$output) Edited April 4, 2006 by nounourson Link to comment Share on other sites More sharing options...
Confuzzled Posted April 7, 2006 Share Posted April 7, 2006 Hello all, With a loop, I write several lines in a txt file. For each step of my loop, I'd like the lines to be one over the other, like : Line 1 Line 2 Line 3... But, when I use @CR or Char(13), I just have 1 line with sentences separated with a kind of empty rectangle, like Line 1[]Line2[]Line3... I'm pretty sure it's a problem of character encoding. Could someone help me ? I've read the help file, but found nothing. Thx in advance I once used a manual typewriter (just for antiquity purposes). When I slammed the carriage return lever from left to right I noticed that it actually did two things. 1: It moved the carriage to the beginning on the same line. 2: Pressing the lever a little further actually moved the carriage up to the next line. I wonder where @CRLF came from? NB: I suspect the problem is not with your output, but what you are viewing it with. You are producing a delimiter that separates your lines and is quite valid and doubling the amount of space the delimiter uses could be somewhat wasteful on a large output file. Link to comment Share on other sites More sharing options...
CyberSlug Posted April 7, 2006 Share Posted April 7, 2006 NB: I suspect the problem is not with your output, but what you are viewing it with. You are producing a delimiter that separates your lines and is quite valid and doubling the amount of space the delimiter uses could be somewhat wasteful on a large output file.Exactly. A text editor like Microsoft's infamous notepad expects @CRLF line endings. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! 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