Autohokey Continue Code on Next Line

im new hto ahk

  • Guests
  • Last active:
  • Joined: --

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

  • Guests
  • Last active:
  • Joined: --
  • Back to top

im new here

  • Guests
  • Last active:
  • Joined: --
  • Back to top

  • Members
  • 391 posts
  • Last active: Jul 05 2011 03:39 PM
  • Joined: 17 May 2007

Have you tried `n (linefeed)?
________
Essential Vaaapp Vaporizer

  • Back to top

sosaited

  • Members
  • 278 posts
  • Last active: Oct 06 2009 06:08 PM
  • Joined: 24 Feb 2005

Example script:

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
Posted Image

  • Back to top

garry

  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005

usually use `r `n ( ASCII 13 and 10 )

  • Back to top

im new to ahk

  • Guests
  • Last active:
  • Joined: --

i tried 'r and 'n, but it didn't make any files.

  • Back to top

jethrow

  • Moderators
  • 2854 posts
  • Last active: May 17 2017 01:57 AM
  • Joined: 24 May 2009
FileAppend, First Line`nSecond Line`nThird Line`nFourth Line, Sample.txt Run, Sample.txt              

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:

  • Back to top

im new to ahk

  • Guests
  • Last active:
  • Joined: --
FileAppend, First Line`nSecond Line`nThird Line`nFourth Line, Sample.txt Run, Sample.txt                

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

  • Back to top

jethrow

  • Moderators
  • 2854 posts
  • Last active: May 17 2017 01:57 AM
  • Joined: 24 May 2009

Try this:

MsgBox, First Line`nSecond Line`nThird Line`nFourth Line

Does that display a Message Box with 4 lines? If so, that answers the op.

  • Back to top

purloinedheart

  • Members
  • 538 posts
  • Last active: Sep 22 2014 09:35 PM
  • Joined: 04 Apr 2008

i tried 'r and 'n, but it didn't make any files.

` =/= '

  • Back to top

Xanox

  • Guests
  • Last active:
  • Joined: --

I must be overlooking something very simple, but i try to add a line to the top of the file.

Would be great if someone could tell me how to do that.

  • Back to top

  • Guests
  • Last active:
  • Joined: --

Because there is a problem with autohotkey.net at the moment you can't download the TF library but try again tomorrow via this link <!-- m -->viewtopic.php?t=46195<!-- l -->

  • Back to top

  • Guests
  • Last active:
  • Joined: --

Are you using the single quote ' or the tick `? You want the tick mark, which is shared with the tilda key in the upper left corner of my keyboard.

  • Back to top

Tonedef

  • Members
  • 1 posts
  • Last active: Oct 11 2012 10:14 PM
  • Joined: 11 Oct 2012

Another thing to keep in mind is that, depending on the application you're inserting the text into, if you want to insert multiple lines you may need to put a space in between `r`n and the next `r`n, so they don't get wrapped up into one newline:

MsgBox, Line1`r`n `r`nLine 3

  • Back to top

ortizhersh1990.blogspot.com

Source: https://www.autohotkey.com/board/topic/44959-new-line-break-line/

0 Response to "Autohokey Continue Code on Next Line"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel