Using AppleScript to Programmatically Convert PICT to BMP
This article was previously published under Q109483 SUMMARY
Because the Pict To Bmp application that comes with FoxPro for Macintosh is
a "scriptable" application, you can instruct it to programmatically convert
a file of type "PICT" to a file of type "BMP" using AppleScript.
See below for instructions and a sample script. MORE INFORMATION
The following script can be called from within FoxPro for Macintosh or any
other application that can communicate with the AppleScript extension. The
script can be keyed into the AppleScript Script Editor supplied with the
AppleScript extension.
This script requires that Scripting Additions be installed in the Extensions subfolder of the System Folder. The "choose file" Scripting additions is utilized. These additions are supplied with the AppleScript extension and placed in the Extensions folder by the Installer program. Please note that due to the limitations of the character set used to display and print this Microsoft Knowledge Base article, the line- continuation character created by pressing OPTION+RETURN on the Macintosh has been replaced by a semicolon (the FoxPro line-continuation character). When you are typing the script in the AppleScript Script Editor, replace any line that ends with a semicolon with the appropriate line-continuation character. To create the script:
tell application "HD:FoxPro:Goodies:Misc"
If the user chooses to cancel the script at any time during the execution
of the script, the following FoxPro error message will be displayed:
Script error: User canceled.
To avoid the display of this message in the context of a FoxPro program or
application, use an ON ERROR handling routine to trap for error number
1917.
For more information about creating scripts with AppleScript, see the "AppleScript Language Guide" or contact the Apple Programmer's and Developer's Association (APDA).
| Article Translations
|
Back to the top
