• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Advanced Text Placement

STEEDOE

Lurker
Feb 6, 2016
6
0
Hey guys I'm fairly new to tasker and a a little overwhelmed, but I'm really excited about its massive potential.
What I'm looking for is a way to have some way to paste or text expand the current date in a specific format. So that when I'm typing in phone I can insert the the exact date whenever I want.

The main thing that I want is a little complicated and specific but would be awesome if you guys could halp me out with.
I need a script to auto fill or paste (or by any method) the current date, five spaces (like tab indent), and then ".txt".
The tricky bit is if after it is generated to put the typing cursor right before the period in the ".txt" string.
This is so that I can make a special name template for a text file and then simple type out the name of the file and enter.
Any help regarding text expansion or active date variables would be awesome.
 
no im not rooted.
thanks answering!
im looking for the year, the month, and the day all in numeric values with no spaces in between.
an example of a blank file would be:
20160206 .txt

an example of a file with a name would be:
20160123 List of Characteristics.txt

Ideally i would want two text strings. one would be the one above that would be a file name, and the other would be a long drawn out, specific date string that i would use at will inside the file im typing. an example of latter could be:
5:45 PM Saturday, February 06, 2016
 
Upvote 0
My recommendation with Tasker is to start out simple and nibble away at learning it. This as a starting project is slightly advanced.

You would create a scene with a text box and a button.
In use you would type in the text box and hit the button.
The task would then append a date in front of the string and a .txt string after it.
It would then do whatever you told it to do with the string.

... Thom
 
Last edited:
Upvote 0
Okay guys ima try again here.
I need two things.
Two auto replacement script things for inserting the date as a text string.
Help me!
What is the first thing I do.
I create a profile? What settings should I set for the profile.
I found this thing called control V keyboard for tasked which seems to be offering what I want. How can I use it to do what I want?
 
Upvote 0
The following task will take the string from the Clipboard and add a prefix and suffix ... like ...
testname​
... will become ...
20160516testname.txt​

So you would ...
do a Copy to clipboard
execute task A
do a Paste from clipboard

The task getFormattedDate is available at http://tasker.wikidot.com/getformatteddate

A
A1: Perform Task [ Name:getFormattedDate Priority:%priority+1 Parameter 1 (%par1):%TIMES Parameter 2 (%par2):yyyymmdd Return Value Variable:%formatteddate Stop:Off ]
A2: Variable Set [ Name:%filename To:%CLIP Do Maths:Off Append:Off ]
A3: Set Clipboard [ Text:%formatteddate%filename.txt Add:Off ]

(warning: setting the priority in A1 higher than the calling task is critical)

... Thom
 
Last edited:
  • Like
Reactions: electricpete
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones