Created
July 14, 2021 09:32
-
-
Save kontrafiktion/e4541ce668b96d29ec0762d19926189b 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 processMessage(theMessage) | |
try | |
tell application "Airmail" | |
set subj to subject of theMessage | |
set theURL to the selectedMessageUrl | |
end tell | |
set urlEncodedSubj to urlencode(subj) | |
set createTaskURL to "goodtask3://add?title=" & urlEncodedSubj & "&url=" & urlencode(theURL) & "&due=08:45" & "&alarm=08:45" & "&list=work" | |
do shell script "open \"" & createTaskURL & "\"" | |
set selectTaskURL to "goodtask3://task?title=" & urlEncodedSubj | |
delay 0.5 | |
do shell script "open \"" & selectTaskURL & "\"" | |
on error errStr number errorNumber | |
display dialog errStr | |
end try | |
end processMessage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment