Is it possible to create a Mail signature that contains a countdown timer?
I only want to display number of days until theEnd. The applescript for the calculation is simple enough, but that doesn’t get the result into a signature…
I discovered this problem too, right about the same time you posted this. ugh.
Anyway, what I want to do is just have a very simple signature line that gives how many days until theEnd.
(I’m a very bad newbie, but here is what I have tested with:)
set endDate to date "Sunday, August 31, 2014 12:00:00 AM"
set theEnd to (endDate - (current date)) div days as string
set endString to " days remaining"
set theText to theEnd & endString
tell application "Mail"
make new signature with properties {name:"TimeLeft", content:theText}
end tell
But this doesn’t actually create a new signature that I can see. (Plus it messes up my Mail so I have to quit, then restart Mail to open the preferences…)
A workaround might be to manually create your signatures. Then have your script set the current signature. I see in the dictionary where you can set it to sequentially. If that doesn’t work you could have your script go through a list of signature names. I’d do some testing. For instance, after manually creating your signatures. Run an AppleScirpt like:
tell app "Mail"
name of every signature
end tell
This should give you a list of signature names that you can iterate through daily.