Using AppleScript for batch conversion


3DO PostPro supports AppleScript as a batch conversion process utility. This allows you to convert many cels from one format to another quickly and easily.

Note: AppleScript is a separate program and must be installed on your system. You can purchase it copy from an Apple retail establishment.

This section first covers how to use a simple script to convert Photoshop files to a specified cel type. Later, it covers how to use a script saved as an application, or droplet, dragging and dropping files onto it for immediate conversion.

Make sure that you have a copy of Script Editor installed on your system. You can place it in a convenient location. It does not have to be placed in either of the System or extensions folders. Look for the icon shown in Figure 1.

Graphic cannot be 
displayed

Figure 1: Script Editor icon.

What to expect

This is not a tutorial on how to write AppleScript scripts, only how to apply the scripting language for use with 3DO PostPro for conversion purposes.

For information on the AppleScript language itself, see the Apple "AppleScript Guide" manual.

How to use a simple AppleScript

A basic script for conversion prompts 3DO PostPro to open a file and defines the file type to convert it to, giving specifications such as:

Figure 2 shows a script that opens a single specified file (name and type) and converts it to a 3DO cel, 16-bit uncoded, and packed. It then instructs to save the converted file in a specific location (folder) under a specific name. Lastly, it instructs to close the original file leaving it in its original condition.

Graphic cannot be displayed

Figure 2: Simple AppleScript conversion script.

A slightly more complicated type of script can open many files and convert each to its own cel (or image) type, with different characteristics, if desired. The following illustration is an example of a script that opens several PICT files and converts each to a different 3DO cel type with its own specifications and name. Figure 3 shows an example of this type of script.

Graphic cannot be 
displayed

Figure 3: AppleScript for converting multiple files.

How to use an AppleScript droplet

The more complex and powerful script is one saved as an application, called a droplet. By adding drag and drop capabilities to this application, it gives you the ability to drag and drop files onto the droplet icon for immediate conversion. You can drag and drop files one at a time, or in groups. Figure 4 is an example of an icon for an AppleScript application droplet.

Graphic cannot be displayed

Figure 4: AppleScript droplet icon.

When you drag a group of file icons onto a droplet (application) icon, a message is sent to the application containing a list of the files. AppleScript intercepts the message and runs the script, converting the files.

Double-clicking on the icon opens a window that gives a brief description of what the application accomplishes. Figure 5 shows the droplet window for the icon in Figure 4.

Graphic cannot be 
displayed

Figure 5: Droplet application window.

This particular droplet application converts Photoshop RGB images to a specified cel type. The script can also be activated (run) by dragging and dropping an alias on to it.