Write to file, append new line

Post your questions and help other users.

Moderator: Martin

Post Reply
lord_EarlGray
Posts: 19
Joined: 16 Jun 2018 21:17

Write to file, append new line

Post by lord_EarlGray » 17 Feb 2020 21:16

Hi, I'm trying to make automatic time tracker based on locations. I need to write some data to csv file. What I found is, that Write to File action appends current file but it continues last line instead of hoping to new one. How can I change that? I need it to write into new line each time this action is executed.

User avatar
Rafi4
Posts: 281
Joined: 01 Dec 2017 05:23

Re: Write to file, append new line

Post by Rafi4 » 17 Feb 2020 23:05

Hi
Simply use below code before or after the text where you wish a new line.
From record4

Code: Select all

{"\n"}
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Write to file, append new line

Post by Martin » 19 Feb 2020 19:51

The text field in action Write to File should also accept new lines so an option to insert a line break should be shown on the soft keyboard.

Regards,
Martin

lord_EarlGray
Posts: 19
Joined: 16 Jun 2018 21:17

Re: Write to file, append new line

Post by lord_EarlGray » 22 Feb 2020 13:06

Rafi4 wrote:
17 Feb 2020 23:05
Hi
Simply use below code before or after the text where you wish a new line.
From record4

Code: Select all

{"\n"}
That works, thank you!

Post Reply