Export to GMail for iPhone
I know Ethan had a way more sophisticated version of this, and there may be others on this forum, but I've a simple script to export contexts, one per email, to Mail and then to GMail IMAP so that I can at least see my shopping list on the iPhone.
[CODE] tell application "OmniFocus" repeat with theContext in contexts of default document set contextName to name of theContext set body to "" repeat with theTask in remaining tasks of theContext set TaskProject to containing project of theTask set taskLine to name of theTask & " (" & name of TaskProject & ")" if theTask is next then set taskLine to "* " & taskLine else if theTask is blocked then set taskLine to " (" & taskLine & ")" else set taskLine to " " & taskLine end if set body to body & taskLine & " " end repeat tell application "Mail" set theMessage to make new outgoing message with properties {visible:false, subject:"@" & contextName, content:body} close theMessage saving yes end tell end repeat tell application "Mail" set destination to (a reference to mailbox "tasks" of account "GMail") set newMailList to (get messages in drafts mailbox) set oldMailList to (get messages in destination) delete oldMailList move newMailList to destination end tell end tell [/CODE] I hope it comes in handy. Duncan McGregor |
Thanks for posting this
Thanks a lot for posting this and as you said it did come in handy,I expect more of these kind of stuff from you.bye for now!
|
Awesome! Thanks Duncan. Ethan's version was far too advanced for me as I'm just getting started. Your version was spot on.
|
All times are GMT -8. The time now is 06:46 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.