Error in Things Todo Script

In my previous post I had in small error in the script that created the todos in Things from a mail message. Here is the updated script:

tell application "Mail"
set cr to ASCII character 13 -->You can probably use the Unicode Equivalent but I didn't know it and this worked right away.
set LF to ASCII character 10 --> Same as here
set carriage_return to (cr & LF as Unicode text)
set theSelectedMessages to selection
set the selected_message to item 1 of the theSelectedMessages
set message_id to the message id of the selected_message
set message_url to "message:%3C" & message_id & "%3E"
set TheSubject to the subject of the selected_message
set theBody to "[url=" & message_url & "]From: " & the sender of the selected_message & " - Subject: " & TheSubject & "[/url]"
tell application "Things"
show quick entry panel with properties {name:TheSubject, notes:theBody}
end tell
set currentMailbox to the mailbox of the selected_message
set currentAccount to the account of the currentMailbox
set filedMailbox to "All Mail"
move selected_message to mailbox filedMailbox of currentAccount
end tell

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.