Scripting
With OmniFocus Pro you have access to powerful scripting tools using the built-in AppleScript library. To access the dictionary of scripting commands specific to OmniFocus, open AppleScript Editor and choose File ▸ Open Dictionary (Shift-Command-O), then choose OmniFocus.app from the list that appears.
You can add scripts that live in your OmniFocus toolbar by placing them in the directory accessible from the Help ▸ Open Scripts Folder menu item.
Check out the resources below to get started with ideas, tips, and help for adding automation to your OmniFocus workflow:
AppleScript discussion on the official OmniFocus Forums.
An AppleScript overview, tips, and an extended list of resources can be found at Inside OmniFocus.