AutoHotkey Community

It is currently May 26th, 2012, 10:39 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: new line / break line
PostPosted: September 13th, 2009, 4:42 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject: Line break
PostPosted: September 13th, 2009, 5:08 am 
`r

is a return


Report this post
Top
  
Reply with quote  
 Post subject: Re: Line break
PostPosted: September 13th, 2009, 5:51 am 
royboy wrote:
`r

is a return


didn't work :|


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2009, 6:12 am 
Offline

Joined: May 17th, 2007, 6:03 pm
Posts: 391
Location: Titan
Have you tried `n (linefeed)?
________
Essential Vaaapp Vaporizer


Last edited by lilalurl.T32 on March 13th, 2011, 7:44 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2009, 6:42 am 
Offline

Joined: February 24th, 2005, 8:45 am
Posts: 278
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
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2009, 12:23 pm 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2249
Location: switzerland
usually use `r `n ( ASCII 13 and 10 )


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2009, 7:03 pm 
i tried 'r and 'n, but it didn't make any files.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2009, 7:20 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
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. :wink:

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2009, 11:23 pm 
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. :wink:


Thanks for the tips, but still didn't work :|


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 13th, 2009, 11:39 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
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.

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2009, 1:16 am 
Offline

Joined: April 4th, 2008, 8:15 pm
Posts: 538
Location: Canada
im new to ahk wrote:
i tried 'r and 'n, but it didn't make any files.


` =/= '


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: JSLover, Miguel, rbrtryn, XstatyK, Yahoo [Bot] and 56 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group