View Single Post
It works with normal attachment, but not with embedded attachement.

You can test this with this adapted code:

Code:
-- Return a list of path of the files linked or enclosed in the note of the task
on getPathOfFilesAttached(aTask)
	tell front document of application "OmniFocus"
		tell note of aTask
			set NumberOfFileAttached to number of file attachment
			set i to 1
			set ListOfPaths to {}
			repeat while i ≤ NumberOfFileAttached
				if file attachment i is embedded then
					set end of ListOfPaths to "embedded file: " & file name of file attachment i
				else
					set end of ListOfPaths to file name of file attachment i as string
				end if
				
				set i to i + 1
			end repeat
			
		end tell
	end tell
	return ListOfPaths as list
end getPathOfFilesAttached


tell application "OmniFocus"
	tell default document
		set myTask to task id (id of item 1 of selected trees of content of front document window)
		set result to my getPathOfFilesAttached(myTask)
		result
	end tell
end tell

You should contact the Ninjas :)