At some time or another, every Mac user has dealt with files that they inherited over a network from a PC or Unix OS and then cannot open in any of their applications. A simple example is the familiar .html files that a web developer grabs over a network to work on (basically, text files that can be viewed in a browser). They appear on the desktop as a featureless icon and cannot be opened from the browser’s File menu. This is because these files have no Mac file type or creator type that the Mac OS can identify them with. The File Exchange control panel was designed to deal with these frustrating situations. You can do two things with this application:
Map a file extension like .htm or .html to a particular Mac OS creator type and file type, so that whenever files with these extensions are downloaded the Mac OS knows what to do with them. In File Exchange parlance this process is called “extension mapping.” This is handled in the PC Exchange panel of the File Exchange control panel.
Map a file type to an application (or more than one) that will be used to handle those files. For instance, you might choose BBEdit 5.0 to deal with the file whenever you want to handle files of type “TEXT.” This is called “translation mapping.” The File Exchange File Translation tabbed panel handles these mappings.
Of course, all of these elements are AppleScriptable, or we would not
be wandering this path. You can create new extension mappings with
the scriptable File Exchange control panel. This capability virtually
cries out for a droplet that, for example, creates a new extension
mapping based on a file that you drag to the droplet. This is
accomplished in the Example section at the end of the chapter, which
covers Version 3.0.3 of File Exchange. You can find out the version
of your File Exchange simply by checking its
version
property, as in the upcoming syntax
example. Figure 24-1 shows the PC Exchange tabbed
panel of the File Exchange app in OS 9.