View Single Post
Hi,
I'm trying to write an applescript to use as a Folder Action. When a file is moved into the folder, the script should (a) find the path to the file , (b) opens an OO document named 'DocRepository', and (c) add the file path as an Attached File. The idea is to keep an OO document with links to the files in the folder . The script I have so far sort of works, except that it creates an entry with the filename in text form. Can anybody suggest how to do this properly, so that the item that's created is an actual link to the file ?
Many thanks,
Bill

on adding folder items to this_folder after receiving these_items
repeat with myFile in these_items
set myFileText to (myFile as text)
tell application "OmniOutliner Professional"
tell document "DocRepository"
make new row with properties {topic:myFileText} at beginning of rows
end tell
end tell
end repeat
end adding folder items to