View Full Version : I Want to email tasks from OF Mac the same way I do from OF iPad?
policarpo
2010-11-01, 09:13 PM
Does anyone know of an Applescript which will allow me to email a Task with Notes from the Mac version of OmniFocus to another user, the way I can from the iPad version?
Since we've lost our connection to iCal I am wanting to email tasks directly to team members instead of sending out .PDFs and a script which would send the same sort of Task attachment file the iPad does would be a great time saver.
This is what the link would look like (but I have no idea how to create an AppleScript in order to automate this):
omnifocus:///add?name=The Task Name Goes Here¬e=This would be the nice little detailed note I would attach to the Task I email.
Could anyone provide any assistance?
Thanks,
-policarpo
Brian
2010-11-02, 04:23 PM
Here's some script I could knock together before my wife came by to pick me up. :-)
This has some limitations, but it's a good skeleton to hang some more code off of, at least.
Things I know need more work:
1) I suspect that the action names and note text needs to be URL-encoded for this to work correctly; a google search may be the best place to start there.
2) Rather than just return-ing the text, you'll need to put it on the clipboard or otherwise send it along to your Mail client...
There are probably other places where this could be improved, as well, but hopefully it helps get you started...
set returnText to "" as text
set taskName to "" as text
set taskNote to "" as text
tell application "OmniFocus"
set theDoc to document window 1 of default document
set TaskList to the value of the selected tree of the content of theDoc
if (count of TaskList) is equal to 0 then -- nothing is selected
display alert "No items selected" message "To forward an action as email, at least one action must be selected in the frontmost OmniFocus window. Please do so, then try again." buttons {"Stop"} default button 1 as warning
return
end if
repeat with theSelectedTask in TaskList
set taskName to (name of theSelectedTask as rich text)
set taskNote to (note of theSelectedTask as rich text)
set returnText to returnText & ("omnifocus:///add?" as rich text)
set returnText to returnText & "name=" & taskName & "¬e=" & taskNote & return
end repeat
return returnText
end tell
policarpo
2010-11-15, 11:42 AM
Thanks,
Have you been able to look into this anymore?
Schnack
2010-11-17, 12:28 AM
This is a functionality that I would really use to death. I'd love to be able to email OF tasks/notes to myself or colleagues.
policarpo
2010-11-17, 10:07 AM
Yeah, i really miss this. I use it all the time in 2Do with my Wife. 2Do just does multi-selecting and sharing very very well.
competition
2010-11-17, 01:19 PM
I love that feature, using it every day on my iPad!
I hope that it will be implemented in OF Mac soon.
Brian
2010-11-17, 01:46 PM
In case it's useful to folks, one of our support ninjas created a web form that creates OmniFocus task links (http://twitter.com/dmessent/status/2569990364463104) via javascript. (The javascript all executes in the browser; information is not sent to his server.)
policarpo
2010-11-17, 07:43 PM
That's cool. Anyway to have that work with OF on the desktop so I can email an existing task to another OF user?
Nigelh
2010-11-17, 09:41 PM
I'd love to have a shortcut that would turn an omnifocus task into an email. Last month I sent out a request to a staff member via email for some info. At present I use the response to activate my 'next step'... But they didn't respond and I forgot about following it up.
At present the only solution seems to be to set Mail to send me a copy and then to clipotron that to Omni. That's untidy and creates multiple copies.
It would be much easier to create the request in OF, and clip it to an email where I only have to fill out the address.
Please?
Brian
2010-11-18, 05:42 PM
Bringing the "Email a task" feature that we did as part of our work on the iPad application to the other two editions is something we want to do; just haven't been able to fit it on the schedule yet.
Schnack
2010-11-18, 11:45 PM
Seems like something you might want to consider bumping up the schedule Brian, as it's clearly a functionality that your loyal users are demanding! :)
policarpo
2010-11-19, 05:38 AM
Also when you guys do it be sure to allow multiple tasks to be emailed at once. Download a copy of 2Do and look at how they deal with multi selection and contextual tasks within their list views and follow this as a standard to update the OF iOS devices to. Please. Thanks.
And yes, I've submitted this as a feature request ;^)
jeredb
2011-02-16, 02:45 AM
I just finished up an Applescript that might fit your bill: http://jeredb.com/i/DelegateFromOF
competition
2011-02-16, 12:58 PM
I wrote my own script to get the iPad's email feature.
It could be improved, because i'm just replacing blanks, in further version it would be useful to replace other strings like: ', ", /, ...
At the moment they break the omnifocus url.
It would be useful if somebody could post an link generated with the iPad version full of special characters.
Have fun, but keep in mind, that it'll only work if you have plain text without special characters inside your task and note!!
Only one selected task can be send...
-- by competition
tell application "OmniFocus"
tell front document
tell document window 1
set theSelectedItems to selected trees of content
if (count of theSelectedItems) = 0 then
try
display dialog "No task selected!"
end try
else
set theName to name of item 1 of theSelectedItems
set theNote to note of value of item 1 of theSelectedItems
-- No empty notes
if theNote is "" then
set theFinalNote to ""
else
set theFinalNote to "¬e=" & my replaceString(theNote, " ", "%20")
end if
set omniLink to "omnifocus:///add?name=" & my replaceString(theName, " ", "%20") & theFinalNote
tell application "Mail"
set myMessage to make new outgoing message with properties {subject:"Omnifocus: " & theName, content:omniLink}
set visible of myMessage to true
activate
end tell
end if
end tell
end tell
end tell
-- Replace spaces
on replaceString(theText, oldString, newString)
set AppleScript's text item delimiters to oldString
set tempList to every text item of theText
set AppleScript's text item delimiters to newString
set theText to the tempList as string
set AppleScript's text item delimiters to ""
return theText
end replaceString
mctheriot
2011-04-11, 09:40 AM
Hi, I tried searching "email action" and could not Di ad anything.
When I create a action, waiting for someone, I Like to email them with the information. Right now I can drag the action to Mail and it creates a link in the body. I then have to copy and paste the notes. Is there a better way (like on the iPad?
What I would like is something that does:
subject line = the action name
Email body = the notes
Thanks!
Mark
Brian
2011-04-11, 02:12 PM
Merging this post with an existing thread that has the info you're looking for. Hope this helps!
mctheriot
2011-04-12, 08:40 AM
Thanks Brian!
Now, I'm not an AppleScript guy. (so bear with my ignorance here)
Is there a completed file that I can download? How would you install/reference it?
Thanks on advance for the help!
Mark
skylarkelly
2012-04-07, 07:36 PM
Unless I forgot how to install scripts for omnifocus, I'm getting some weird behavior out of what you've written. I'm no pro. Actually I can't even write the stuff, so take this for what it's worth. When I select an item in OF and run the script Mail successfully opens a new message. However, the return I get is like this:
omnifocus:///add?name=250%20words%20about%20projecting%20having %20fun%20vs%20having%20fun¬e=projecting%20fun%20is%20dangerous.%20can%20it %20be%20useful?%20if%20you%20put%20that%20energy%2 0out%20and%20it%20reflects%20back%20on%20you%20the n%20it%20starts%20a%20positive%20feedback%20loop,% 20at%20which%20point%20you've%20gained%20energy%20 and%20no%20longer%20need%20to%20project%20fun%20in %20order%20to%20have%20fun%20and%20simply%20BE%20F UN%20within%20your%20environment.%20This%20is%20wh at%20dad%20meant%20by,%20'Your%20state%20of%20bein g%20effects%20the%20room.'%20'You%20are%20the%20au thor%20of%20your%20own%20experience.'%20And%20fina lly%20the%20hated,%20'Fake%20it%20till%20you%20mak e%20it.'
Any ideas why that's happening? I wish it weren't because this would be the script I am DYING FOR. YOU HEAR ME SUPPORT NINJAS?!?!?!? I AM DYING FOR THIS TO WORK!!!
skylarkelly
2012-04-07, 07:41 PM
Never mind! I figured it out with some clicking and deleting. However, SUPPORT NINJAS, I would still really, really love to see this little tiny feature implemented in an edit menu or something like that. Thanks :)
vBulletin® v3.8.7, Copyright ©2000-2025, vBulletin Solutions, Inc.