Created
April 3, 2023 00:14
-
-
Save smcllns/e5e1bdf89f32eaef85cb6fc629694353 to your computer and use it in GitHub Desktop.
Applescript to make a keyboard shortcut to insert today's timestamp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input, parameters} | |
set {year:y, month:m, day:d} to (current date) | |
set mStr to (m as integer) as string | |
if (m as number) < 10 then set mStr to "0" & mStr | |
set dStr to (d as integer) as string | |
if (d as number) < 10 then set dStr to "0" & dStr | |
set customDateTime to y & "-" & mStr & "-" & dStr | |
return customDateTime as string | |
end run |
Author
smcllns
commented
Apr 3, 2023
- Open Automator on macOS
- Create new Quick Action
- Use the above code
- [some more steps to creating a keyboard shortcut to run that Quick Action - need to look up again]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment