The code provided by Lutin above is not working for me. When I attempt to access one of the file attachments of the note of a task, I get a scripting error -10000.
Code:
count every file attachment of note of inbox task id "n9bV1yd8CdN" of document id "m1VId-wcJcH"
--> 1
get file attachment 1 of note of inbox task id "n9bV1yd8CdN" of document id "m1VId-wcJcH"
--> error number -10000
I’ve reported this to the OmniFocus support ninjas. Hoping I’ve missed something obvious, because I’m not holding my breath for a speedy fix if it is indeed a bug. :(