mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Automatically insert backlink to the message in the Mail.app Apple
Script.
This commit is contained in:
parent
5299490c83
commit
c7828185d6
1 changed files with 4 additions and 1 deletions
|
|
@ -35,6 +35,7 @@ on importMessage(theMessage)
|
|||
set theSender to the sender of theMessage
|
||||
set theSubject to subject of theMessage
|
||||
if theSubject is equal to "" then set theSubject to emptySubject
|
||||
set theMessageId to message id of theMessage
|
||||
|
||||
-- Construct the description string from the email info
|
||||
set myDesc to "Email " & theSender & " about " & theSubject
|
||||
|
|
@ -42,13 +43,15 @@ on importMessage(theMessage)
|
|||
if length of myDesc > 100 then
|
||||
set myDesc to characters 1 thru 100 of myDesc
|
||||
end if
|
||||
|
||||
set myNote to "message://<" & theMessageId & ">"
|
||||
end try
|
||||
end tell
|
||||
|
||||
-- Now send all that info to Tracks
|
||||
-- Edit the URL of your Tracks installation if necessary"
|
||||
tell application "<%= home_url %>backend/api"
|
||||
set returnValue to call xmlrpc {method name:"NewTodo", parameters:{myUsername, myToken, myContextID, myDesc}}
|
||||
set returnValue to call xmlrpc {method name:"NewTodo", parameters:{myUsername, myToken, myContextID, myDesc, myNote}}
|
||||
end tell
|
||||
|
||||
(* Growl support - comment out or delete this section if
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue