on open added_items try repeat with i from 1 to number of items in added_items set this_item to item i of added_items tell application "Finder" to set file_name to (name of this_item) tell application "OmniFocus" tell quick entry open set NewTask to make new inbox task with properties {name:file_name} tell the note of NewTask make new file attachment with properties {file name:this_item, embedded:true} end tell activate end tell end tell end repeat end try end open