Guest
2011-03-07, 09:32 AM
To append new files, rather than delete incumbent files, and to leave the the notes expanded, you could experiment with a draft like this:
Code:
tell application "OmniOutliner Professional"
if (count of documents) < 1 then return
tell front document
set refRows to a reference to (selected rows)
if (count of refRows) < 1 then return
set theReply to (choose file)
set strPath to "file://localhost" & my encode(POSIX path of theReply)
set oTmpRow to make new row at end of rows with properties {note:strPath & return}
set refParas to a reference to paragraphs of note of oTmpRow
repeat with oRow in refRows
duplicate refParas to after paragraphs of note of oRow
end repeat
set note expanded of refRows to true
delete oTmpRow
end tell
activate
end tell
on encode(strPath)
do shell script "python -c 'import sys, urllib as ul; print ul.quote(sys.argv[1])' " & ¬
quoted form of strPath
end encode
--
Last edited by RobTrew; 2011-03-07 at 09:47 AM..