|
Batch Convert Files |
|
2005.03.08 |
http://www.barefeetware.com/appleworks/batch_convert/ |
|
Description |
This AppleWorks command converts the files selected in the Finder to the format of your choice, asking you for the output location. |
|
Enhancement |
This is one of 40 features added by the Enhancement Pack for AppleWorks. |
|
Detail
The Batch Convert Files command is in the Document sub-menu of AppleWorks Scripts Menu. To use it:Advanced
- Select some files in the Finder.
- Select the Batch Convert Files menu command.
- When asked, confirm the list of files to be converted by clicking OK.
- From the list of translators, select the desired option.
- Choose the appropriate destination for the translated files.
This command can only translate to formats that are available to AppleWorks. If you cant manually save as a particular format, then this script cant do it either.Requirements
AppleWorks 6 builds the list of translators according to what you have installed (eg MacLinkPlus). For AppleWorks 5, you need to add an installed translator to this scripts list by following the directions below under Scripting.
There is a bug in AppleWorks 6.0 that prevents AppleScript from saving as any format that appears above the line in the File Format pop up menu in the Save As dialog box. Specifically, these formats are: AppleWorks (ie version 6), AppleWorks 5.0, ClarisWorks 4.0, ClarisWorks for Kids. This script has a work around for AppleWorks, but the others will fail with an error:
Cannot save the document. If you can manually translate it, then there is an AppleScript bug in AppleWorks. Otherwise, the translator is not supported for this type of document.
To save as AppleWorks 5.0, if you have MacLinkPlus installed, you can select the AppleWorks [MacLink®] in the scripts format list (see Scripting below), to work around this bug in AppleWorks 6.0.
Operates on the selected files in the Finder. Works with AppleWorks 5 and 6.Download
Only registered users are permitted to use the supplied files after 14 days or edit them.
This script is included in the Enhancement Pack for AppleWorks, not supplied separately.Scripting
This script may be edited by registered users.Please email us any queries about this page.
AppleWorks 6 builds the list of translators dynamically.
Unfortunately, AppleWorks 5 provides no mechanism for AppleScript to read the installed translators. To adjust the available translators, change one of these lines, depending on your version of AppleWorks:
property translatorsAW5 : {"AppleWorks", "ClarisWorks 4.0", "ASCII Text", "Text", "RTF", "PICT"}
Add a translator name exactly as it appears in the File Format pop up menu in your AppleWorks Save As dialog box.
The main statements are:
open file filePath
save front document in file ((outputFolder as text) & fileName) using translator translatorName