Quote:
Brilliant! I just tested this out with my own Jott and Apple Mail, and it's working great. No more swervy driving whenever I think of something that needs to be in my inbox!
|
Any thoughts?
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!
|
|
FAQ | Members List | Calendar | Today's Posts | Search |
Apple Mail Jott to OmniFocus AppleScript | Thread Tools | Search this Thread | Display Modes |
Guest
2008-12-17, 12:52 PM
Quote:
Any thoughts?
Post 11
|
Member
2009-03-19, 02:26 PM
Jott changed their email template this week, and now no scripts currently work for getting Jott email into omnifocus. I wish I were an applescript guru like Curtis or one of the other talented individuals here, but sadly I am not, nor I am afraid that I ever will find the time to become one.
But if anyone who is facile with applescript could fix this probably simple problem, I know a lot of folks, including me, would greatly appreciate it.
Post 12
|
Member
2009-03-21, 04:43 PM
Quote:
Persistent. Yup. Changing: set messageStart to (offset of "Jott:" in theContent) + 7 set messageEnd to (offset of "Listen" in theContent) - 3 To: set messageStart to (offset of "Jott:" in theContent) + 1 set messageEnd to (offset of "Listen" in theContent) - 4 Seemed to fix things for me. - Don
Post 13
|
Member
2009-03-23, 08:29 AM
Quote:
Post 14
|
Member
2009-04-23, 02:00 PM
Here's my revised script that specifies starting and ending points of your message as properties. This way, if Jott decides to change their message format again, you simply change these parameter values to reflect the change in their message format
--------------- -- Derived from work that is Copyright © 2007, Curtis Clifton All rights reserved. -- Modified to work specifically with Jott messages. -- If true, then the sender of the message is included in the action's description. property includeSender : true -- Start of the message in the body text property firstmsgchar : 1 --Number of spaces between the last char of the message and the "Listen" link property lastmsgchar : 5 property messageSender : "Jott" on run tell application "Mail" set selectedMessages to selection if ((count of selectedMessages) ≠ 1) then display alert "Please select a message to be linked to the new action" message "This script creates a new OmniFocus action that links back to a selected message." buttons {"OK"} default button "OK" giving up after 20 return end if my process_message(item 1 of selectedMessages) end tell end run using terms from application "Mail" on perform mail action with messages theMessages try set theMessageCount to count of theMessages repeat with theMessageIndex from 1 to theMessageCount my process_message(item theMessageIndex of theMessages) end repeat on error m number n tell application "OmniFocus" log "Exception in Mail action: (" & n & ") " & m end tell end try end perform mail action with messages end using terms from on process_message(theMessage) tell application "Mail" set theContent to content of theMessage set theDate to date sent of theMessage set messageId to message id of theMessage end tell tell application "OmniFocus" set messageStart to firstmsgchar set messageEnd to (offset of "Listen" in theContent) - lastmsgchar set taskName to rich text messageStart through messageEnd of theContent if (includeSender) then set taskName to taskName & "—" & messageSender end if set theDoc to first document tell theDoc set propRecord to {name:taskName} set theTask to make new inbox task with properties propRecord end tell tell theTask set start date to theDate set note to return & return tell note set theURL to "message://<" & messageId & ">" set linkText to theURL insert linkText at before first character set value of attribute "link" of style of paragraph 1 to theURL end tell end tell end tell end process_message
Post 15
|
Member
2009-04-28, 04:39 AM
I've never done an apple script. So some help would be appreciated.
I found the script editor. Do I just copy the above, paste it into the "body" field of the editor in the script editor, save it to "my documents", and then it just runs? If this above process is true, where do I start copying? From here: Quote:
Quote:
Quote:
Dan OS10.5.6 MacbookPro
Post 16
|
Member
2009-04-28, 01:19 PM
OK, so I got the script to work. Here's my stupid question. Do I have to run the script each time I want it to happen? Or does it create a rule so that when I get a Jott in my inbox it automatically goes to my omnifocus inbox?
Dan
Post 17
|
Member
2009-04-28, 01:59 PM
The idea is that you make a Mail rule which invokes it...
Post 18
|
Member
2009-05-03, 07:08 PM
Perfect! IT works. Thanks!
Post 19
|
Guest
2009-08-12, 03:26 PM
Thank you, thank you! My Mail rule was no longer sending my Jotts to OmniFocus and I was clueless about what to do, since I didn't know Jott had changed its format. Now it works again, thanks to you.
Post 20
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
omnifocus + Apple Mail + gmail flags/starred integration | smagdali | OmniFocus 1 for Mac | 5 | 2011-10-28 09:31 AM |
Apple Mail to Omnifocus, with attachment | chipjoyce | Applying OmniFocus | 1 | 2010-07-14 12:45 PM |
Omnifocus task/action to Apple Mail | gandalf44 | OmniFocus Extras | 1 | 2009-05-27 12:53 PM |
Jott -> Mail.App -> OmniFocus | jrapp111 | OmniFocus Syncing | 3 | 2008-08-13 07:43 PM |
adding +omnifocus for mail rules - Apple problem? | mhedstrom | OmniFocus 1 for Mac | 12 | 2008-08-08 08:26 PM |