How to access metadata via script/automation?

Can the document metadata (in the Format and Metadata section) be edited via scripting? If so, how? I’ve been searching http://omni-automation.com but to no avail…