All,
I am attempting to write a script for OmniOutliner that would take the currently selected row a start an email message that would use the Topic as the subject line and the notes as the body. I also have a column called Assigned that I would like to use to but into the TO field for the email address. Does someone have a snipit that I could work from?
Thanks in Advance,
George
I’ve never tried scripting OmniOutliner before so this is pretty rough, but it sorta works…
-- Most code stolen from The Omni Group
tell application "OmniOutliner Professional"
tell front document
set theRow to every row where selected is true
if (count of (theRow)) is equal to 0 then
display dialog "Please select a single row to use this script." buttons {"OK"}
return
else if (count of (theRow)) is greater than 1 then
display dialog "Please select a single row to use this script." buttons {"OK"}
return
end if
set bodyField to value of item 1 of cells of item 1 of theRow
set subjectField to value of item 2 of cells of item 1 of theRow
set toField to value of item 3 of cells of item 1 of theRow
end tell
end tell
I say sorta because you may have to play with your cell values a bit… The other thing is if the Assigned cell has an actual email address in it the value returns as a “?”. I noticed that Omni does some weird formatting when you put an email in there so not sure where its actually storing the contents… or if there is a way to make Outliner not do it’s “email” formatting to that field.
Hope this gives you a base to work from. I didn’t include the actual email portion of the script since A: There have been a TON of posts about emailing lately and B: You never said which email client you were using.
cheers!