The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniOutliner > OmniOutliner 3 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Using Applescript to Attach File Thread Tools Search this Thread Display Modes
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,

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
Unfortunately there isn't AppleScript support for attachments right now. I have tried doing something like this myself and had varied results. You can get the path to the file and paste that and rely on OO to convert it to a link, however, it can't deal with spaces in the path. So, short answer, it's not possible right now.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
attach 1 file for several tasks? enigma2k OmniFocus 1 for Mac 4 2012-06-21 08:48 AM
New file via Applescript: do I have this right? Eponymous OmniOutliner 3 for Mac 2 2009-01-31 10:09 AM
Applescript to attach documents tompos OmniFocus Extras 2 2008-01-20 10:29 PM
Sidebar "Attach File..." Option Toadling OmniFocus 1 for Mac 2 2007-12-21 06:01 AM
Attach FIle and Ressources ECG OmniPlan General 4 2006-07-28 08:17 AM

All times are GMT -8. The time now is 08:44 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.