##

## Scripting

A number of Portfolio commands can be accessed through Scripting.

Macintosh: Portfolio supports AppleScript and any other OSA-compliant scripting language.

Windows: Portfolio supports OLE Automation, which can be accessed by a number of scripting languages such as Visual Basic, Visual C++, Java, etc.

For information and examples on the scripting interface for each platform, refer to the “Scripts” folder on the Extensis CD.

Note: Extensis Technical Support cannot provide instruction on how to use the various scripting languages.

The Scripts Menu

The scripts or applications that you write to automate Portfolio can be conveniently launched from within the catalog using a special Scripts menu. This menu is installed in the Portfolio menu bar when valid scripts are placed in a folder named “Scripts” located in the same folder as the Portfolio application. Scripts and applications located in the Scripts folder are added to the Scripts menu and are available as regular menu commands.

This feature is particularly useful for creating custom commands for catalog users. For example: A script could be written that takes the currently selected items and adds the current date to a custom “Publish Date” field in each record. By placing this script in the Scripts folder located in the Portfolio application folder, the user can execute the script by selecting it from the Scripts menu, without needing to know anything about scripts. In fact, the menu item would appear to be a built-in function of Portfolio.

Tip for Mac OS: The Mac OS uses the “-” (dash) character to signify a break in menus. Because of this rule, do not create scripts with a “-” as the first character of the filename.