Last active
May 18, 2021 11:02
-
-
Save monkeydom/bceb6e5f7f620a4d399f169dea11f2b9 to your computer and use it in GitHub Desktop.
This file contains 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 seescriptsettings() | |
return {keyboardShortcut:"$@o", shortDisplayName:"New Document", displayName:"New Document with Date"} | |
end seescriptsettings | |
to secsToHMS(secs) | |
tell (1000000 + secs div hours * 10000 + secs mod hours div minutes * 100 + secs mod minutes) as string ¬ | |
to return text 2 thru 3 & ":" & text 4 thru 5 & ":" & text 6 thru 7 | |
end secsToHMS | |
set {year:y, month:m, day:d, time:t} to current date | |
set theTime to secsToHMS(t as integer) | |
tell application "SubEthaEdit" | |
make new document with properties {name:(d as text) & "." & (m as number) & "." & y & " " & theTime} | |
end tell | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment