There are undoubtedly holes in the scripting support for attachments, so if you have a specific thing you are trying that isn't working, let us know.
Some snippets of commands that our automated tests do (not intended as a runnable script, just as example commands):
Code:
tell MyProject
tell note
-- Create an linked file attachment
make new file attachment with properties {file name:MyFile}
-- Get the path of the attachment
file name of first file attachment as string
-- Check whether it is embedded or linked
embedded of first file attachment
-- Save the data in the attachment to a file
tell first file attachment
save in "hfs:path:to:output.ext"
end
-- Create an embedded attachment (same as above; embedded just defaults to 'false')
make new file attachment with properties {file name:MyFile, embedded:true}
-- Duplicate an attachment
duplicate file attachment 1 to end of characters
-- Delete an attachment
delete file attachment 1
end
end
If you can send in bug reports with scripts showing what you'd expect to work, it'll help (not sure if it'll make it into 1.0, but let us know if it is a show-stopper for a script you are trying to write).