| View previous topic :: View next topic |
| Author |
Message |
im new hto ahk Guest
|
Posted: Sun Sep 13, 2009 3:42 am Post subject: new line / break line |
|
|
hi, im a new ahk coder. I love ahk's simplicity!
I have a question:
How do you make a new line / break line?
I was using FileAppend, and wanted the text to break into several lines. |
|
| Back to top |
|
 |
royboy Guest
|
Posted: Sun Sep 13, 2009 4:08 am Post subject: Line break |
|
|
`r
is a return |
|
| Back to top |
|
 |
im new here Guest
|
Posted: Sun Sep 13, 2009 4:51 am Post subject: Re: Line break |
|
|
| royboy wrote: | `r
is a return |
didn't work  |
|
| Back to top |
|
 |
lilalurl.T32
Joined: 17 May 2007 Posts: 391 Location: Titan
|
Posted: Sun Sep 13, 2009 5:12 am Post subject: |
|
|
Have you tried `n (linefeed)?
________
Essential Vaaapp Vaporizer
Last edited by lilalurl.T32 on Sun Mar 13, 2011 6:44 am; edited 1 time in total |
|
| Back to top |
|
 |
sosaited
Joined: 24 Feb 2005 Posts: 278
|
Posted: Sun Sep 13, 2009 5:42 am Post subject: |
|
|
Example script:
| Code: | FileAppend, First Line`nSecond Line`nThird Line`nFourth Line, Sample.txt
Run, Sample.txt
|
_________________ My small "thanks" to AHK in shape of these dedicated 3d images
 |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 2212 Location: switzerland
|
Posted: Sun Sep 13, 2009 11:23 am Post subject: |
|
|
| usually use `r `n ( ASCII 13 and 10 ) |
|
| Back to top |
|
 |
im new to ahk Guest
|
Posted: Sun Sep 13, 2009 6:03 pm Post subject: |
|
|
| i tried 'r and 'n, but it didn't make any files. |
|
| Back to top |
|
 |
jethrow
Joined: 24 May 2009 Posts: 1907 Location: Iowa, USA
|
Posted: Sun Sep 13, 2009 6:20 pm Post subject: |
|
|
| sosaited wrote: | Example script:
| Code: | FileAppend, First Line`nSecond Line`nThird Line`nFourth Line, Sample.txt
Run, Sample.txt
|
|
| im new to ahk wrote: | | i tried 'r and 'n, but it didn't make any files. |
Try putting SetWorkingDir %A_ScriptDir% in sosaited's example, at the top of the script. Also, 'n and `n are not the same thing.  _________________
- in case I forgot to smile
Basic Webpage Controls
COM Object Reference |
|
| Back to top |
|
 |
im new to ahk Guest
|
Posted: Sun Sep 13, 2009 10:23 pm Post subject: |
|
|
| jethrow wrote: | | sosaited wrote: | Example script:
| Code: | FileAppend, First Line`nSecond Line`nThird Line`nFourth Line, Sample.txt
Run, Sample.txt
|
|
| im new to ahk wrote: | | i tried 'r and 'n, but it didn't make any files. |
Try putting SetWorkingDir %A_ScriptDir% in sosaited's example, at the top of the script. Also, 'n and `n are not the same thing.  |
Thanks for the tips, but still didn't work  |
|
| Back to top |
|
 |
jethrow
Joined: 24 May 2009 Posts: 1907 Location: Iowa, USA
|
Posted: Sun Sep 13, 2009 10:39 pm Post subject: |
|
|
Try this: | Code: | | MsgBox, First Line`nSecond Line`nThird Line`nFourth Line |
Does that display a Message Box with 4 lines? If so, that answers the op. _________________
- in case I forgot to smile
Basic Webpage Controls
COM Object Reference |
|
| Back to top |
|
 |
purloinedheart
Joined: 04 Apr 2008 Posts: 537 Location: Canada
|
Posted: Mon Sep 14, 2009 12:16 am Post subject: |
|
|
| im new to ahk wrote: | | i tried 'r and 'n, but it didn't make any files. |
` =/= ' |
|
| Back to top |
|
 |
|