How to add tab in Fileappend?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
wetware05
Posts: 750
Joined: 04 Dec 2020, 16:09

How to add tab in Fileappend?

13 Jan 2023, 10:34

Hi.

In the next line how to separate the two variables with a tab?

Code: Select all

String1:="In the next line how to separate the two variables with a tab?"
String2:="If you want to join two text strings into one, how to add a tab between the two."
FileAppend, %String1% %String2%, File.txt ;Add Tab


Or failing that. If you want to join two text strings into one, how to add a tab between the two.

Code: Select all

String1:="In the next line how to separate the two variables with a tab?"
String2:="If you want to join two text strings into one, how to add a tab between the two."
String3:=  %String1% %String2% ;Add Tab
FileAppend, %String3%, File.txt
Last edited by wetware05 on 13 Jan 2023, 10:57, edited 1 time in total.
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: How to add tab in Fileappend?

13 Jan 2023, 10:42

A_Tab https://www.autohotkey.com/docs/v1/Variables.htm#Tab

Code: Select all

 FileAppend, %String1% %A_Tab% %String2%, File.txt 
wetware05
Posts: 750
Joined: 04 Dec 2020, 16:09

Re: How to add tab in Fileappend?

13 Jan 2023, 11:02

AHKStudent wrote:
13 Jan 2023, 10:42
A_Tab https://www.autohotkey.com/docs/v1/Variables.htm#Tab

Code: Select all

 FileAppend, %String1% %A_Tab% %String2%, File.txt
Thank you @AHKStudent.

In the second case, can't you...? I know it can be put at the end of the first string, or at the beginning of the second, but in case they are strings that are generated during the script (user input), can't it be joined into a new String with a tab between it both of them?
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: How to add tab in Fileappend?

13 Jan 2023, 11:22

wetware05 wrote:
13 Jan 2023, 11:02
AHKStudent wrote:
13 Jan 2023, 10:42
A_Tab https://www.autohotkey.com/docs/v1/Variables.htm#Tab

Code: Select all

 FileAppend, %String1% %A_Tab% %String2%, File.txt
Thank you @AHKStudent.

In the second case, can't you...? I know it can be put at the end of the first string, or at the beginning of the second, but in case they are strings that are generated during the script (user input), can't it be joined into a new String with a tab between it both of them?
Not sure I knw what you mean

Try

Code: Select all

String3:=  String1 String2 A_tab

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: CoffeeChaton, peter_ahk and 116 guests