I’ve found that the only reason I use any of the text replacement tools is to type the current date, like 2020-04-20_. Does anyone know of a way to do this with an AppleScript service or something similar?
Update: This was poorly worded, is there a way to do this with pure AppleScript? No other apps? Or an Automator “Quick Action”?
Right, and I’ve had them all over the years, using Keyboard Maestro for it now, but it seems kind of like a waste to run an entire app just to type the date every now and then. That’s just the trend I’ve noticed over the past decade or so with my use, I know a lot of other folks get tons more use out of the utilities. YMMV.
This isn’t what you asked for, but I love Brett Terpstra’s Make A Date. Looking back at it, I guess it uses Keyboard Maestro, which I have (and use for a lot of stuff besides text expansion). But there’s nothing like being able to just type >>tues< and get next Tuesday’s date…
I guess it is AppleScript sprinkled with shell script. I also use this method many times. If you want 100% AppleScript you can do it like this:
set DateString to DateStamp()
-- DateString will be 2021-04-24_
on DateStamp()
tell (current date) to tell (year * 10000 + (its month) * 100 + day) as string to text 1 thru 4 & "-" & text 5 thru 6 & "-" & text 7 thru 8 & "_"
end DateStamp