The Macintosh operating system uses type and creator codes to identify which application created the file and to identity what type of document they are. These codes can be used by some file find utilities (such as RetrieveIt! from Claris ClearChoice) to locate files. AppleScript can use these codes to identify file types to display in dialog boxes. The following is a list of Claris Applications and their document type and creator codes.
Application Document Type Creator Type
MacWrite Pro MWPd MWPR
MacWrite II MWII APPL
FileMaker II FMK4 FMK4
FileMaker Pro 2.x FMPR FMPR
FileMaker Pro 2 SDK run FMPR FMPU
FileMaker Pro 2 SDK files FMPR FMPR
FileMaker Pro 3.x FMP3 FMP3
FileMaker Pro 3 SDK run APPL UFSR
FileMaker Pro 3 SDK files FMP3 UFSR
ClarisWorks(WP) CWWP BOBO
ClarisWorks(DR) CWDR BOBO
ClarisWorks(PT) CWPT BOBO
ClarisWorks(DB) CWDB BOBO
ClarisWorks(SS) CWSS BOBO
ClarisWorks(CM) CWCM BOBO
ClarisDraw dDrw CDrw
ClarisImpact(Drw) iDrw CIPT
ClarisImpact(Rpt) iRpt CIPT
ClarisImpact(Prs) iPrs CIPT
ClarisImpact(Drw Stn.) iDst CIPT
ClarisImpact(Rpt Stn.) iRst CIPT
ClarisImpact(Prs Stn.) iPst CIPT
ClarisImpact(Library) iLib CIPT
ClarisImpact(Model) iSty CIPT
ClarisImpact(Prefs) iPrf CIPT
ClarisImpact(Clr Pal) iClr CIPT
ClarisImpact(Help) HUH? CIPT
MacDraw Pro dDoc dPro
Claris Resolve RsWs Rslv
MacProject Pro MPRX MPRP
AppleScript can use type and creator codes to identify types of documents when using the choose file command. This can be useful if one only wants files created by a specific application to be shown in a directory dialog box when using the Choose File scripting addition in AppleScript.
set myFile to (choose file with prompt "Select a MacWrite Pro Document..." of type
{"MWPd", "MWPR"})
tell application "MacWrite Pro1.5"
activate
open myFile
end tell
This script tells the Choose file scripting addition to bring up a directory dialog and to only show MacWrite Pro documents. Once a document has been selected, the document's path is placed in the variable "myFile". That variable is then passed to MacWrite Pro and the file is opened.
For the most current information on what SDKs Apple offers, point your web browser to:
http://developer.apple.com/sdk/