A bit more information. Ok, if you try out the following code on a single selected task with meta-data inside (i.e., a link to a file or folder etc.) you will see my trouble...
First, let's look at a note...
Code:
tell application "OmniFocus"
tell front document
tell document window 1
set theSelectedItems to selected trees of content
end tell
set selectedItem to value of item 1 of theSelectedItems
set selectedNote to note of selectedItem as rich text
end tell
end tell
Now, no matter how you do it, rich text, or normal text, I can't see the links within the note.
Now, if we set the value of the note (let's say we want to add some info into the note, like a url or text etc.) we erase the whole note, because we are not receiving the whole note to work with...
Code:
tell application "OmniFocus"
tell front document
tell document window 1
set theSelectedItems to selected trees of content
end tell
set selectedItem to value of item 1 of theSelectedItems
set selectedNote to note of selectedItem as rich text
set NewNote to selectedNote & " This is a test."
set note of selectedItem to NewNote
end tell
end tell
The link disappears as we add our text (or remove text).
Is there a proper way to work with notes so you don't lose this info? Thank you for your help!!!
-Allen