Skip to content

Instantly share code, notes, and snippets.

@monkeydom
Last active May 18, 2021 11:02
Show Gist options
  • Save monkeydom/bceb6e5f7f620a4d399f169dea11f2b9 to your computer and use it in GitHub Desktop.
Save monkeydom/bceb6e5f7f620a4d399f169dea11f2b9 to your computer and use it in GitHub Desktop.
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