Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make Autotext timestamp better?
#2
Taskts01 will not work if autotext line is ts01
you can however do a couple things

First, all your code can be put into subfunctions of the autotext list .No external macro or function are needed.
 In the example below i have given you a couple of options.

taskts01 will work when  that is typed fully. Will remove ts01 and replace with the time stamp.

[32]ts01 will work when you type any text then hit spacebar followed by ts01(example: Task ts01 becomes Task1909031902).
the space and ts01 will be replaced with the timestamp.
The [32] means space.

Autotext Autotext
Trigger $t     Help - how to add the trigger to the macro
Code:
Copy      Help
/b/i/c
taskts01 :sub.MainTS2 ;;typed fully then ts01 is removed and replaced with timestamp
[32]ts01 :sub.MainTS ;;timestamp output with no space
ts02 :sub.BasicTs ;; add code to #sub BasicTs below
;ts01 sub.MainTS ;;timestamp output only works with ts01 as text

#sub MainTS
DateTime t.FromComputerTime
str sf=t.ToStrFormat("{yyMMdd}{HHmm}")
paste+ sf

#sub BasicTs
;add code here ts02

#sub MainTS2
str userText;TriggerInfoAutotext userText 0 0
DateTime t.FromComputerTime
str sf=t.ToStrFormat("{yyMMdd}{HHmm}")
userText.replacerx("ts.+" "")
sf- userText
paste+ sf


Messages In This Thread
Make Autotext timestamp better? - by pctechtv - 09-03-2019, 06:49 PM
RE: Make Autotext timestamp better? - by Kevin - 09-03-2019, 10:59 PM
RE: Make Autotext timestamp better? - by pctechtv - 09-03-2019, 11:46 PM
RE: Make Autotext timestamp better? - by Kevin - 09-04-2019, 12:07 AM
RE: Make Autotext timestamp better? - by pctechtv - 09-04-2019, 12:15 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)