AppleWorks Scripts

2000.09.18 

 

http://www.barefeetware.com/appleworks/scripts/

What can a
script do?

 

AppleWorks 5 and 6 can have many extra features added by the use of AppleScript scripts. They add functionality to AppleWorks ranging from custom functions to new drawing tools. They install via a simple drag and drop, just like plug ins.

Enhancement Pack
for AppleWorks

 

The best way to start using scripts for AppleWorks is to download the Enhancement Pack for AppleWorks. It includes 40 scripts an installer and introductory documentation.

Questions

 

If you have questions about scripting AppleWorks, please ask on one of the AppleWorks discussion forums.

     


Introduction
We are in the process of reconstructing this page and links, so please bear with us.

The scripts below are precompiled, ready to run. They add functionality to AppleWorks ranging from custom functions to new drawing tools. They install via a simple drag and drop, just like plug ins.

These scripts have been written and tested for AppleWorks 5.0.3 and some for AppleWorks 6. They should also work for any version 5.0.x of ClarisWorks and ClarisWorks Office. They will not work with earlier versions of ClarisWorks which have less AppleScript support.

While freely downloadable, please register your copy of the Enhancement Pack if you find any of BareFeetWare’s scripts useful. Most scripts are editable. Run-only scripts are usually fairly complex so would probably only confuse the novice AppleWorks scripter.

The sample scripts below perform a wide range of sometimes obscure functions. Many were adapted from answers on discussion lists.

Some scripts, especially those not in the Enhancement Pack, have little or no error checking so focus on the main purpose and keep the editable code simple. For instance, they typically do not check whether the front document is the appropriate type and so will fail if a spreadsheet script tries to adjust a word processing document.

Some scripts have been provided by people outside of BareFeetWare and have probably not been tested by us. The author should be contacted directly for any queries.

Editable scripts often contain code commented out under a heading like: “This should work but doesn't due to bugs in AppleWorks”. This shows how simple the script could be if the AppleWorks AppleScript problems were fixed (many are fixed in AppleWorks 6). Although able to be opened and run from within a script editor, the scripts operate significantly faster when run as compiled scripts, such as from AppleWorks' scripts menu.

If there is a function that you would like to see added to AppleWorks then give us your suggestion. If you have your own script which involves AppleWorks, please submit it for inclusion on this web site.

If these scripts are useful to you, please leave a comment.

Installation

Enhancement Pack scripts can be installed using the included Install application or following the instructions in the readme file.

For other scripts, download them via the links provided. Decompress using Aladdin's Stuffit Expander 5.x. Earlier versions of Stuffit Expander will not work.

Installation is simple. Each script is either a compiled script or an applet with different icons, as below.

Compiled Script
To install any of these scripts to add functionality to AppleWorks, drag the script into your AppleWorks Essentials folder (for AppleWorks 6) or AppleWorks Scripts folder (for AppleWorks 5). The easiest way to locate this folder is to launch AppleWorks and choose Open Scripts Folder from the script menu.



To use the added script, just select it in the scripts menu. Custom functions can also be called from an spreadsheet calculation.

Applet
An applet can be run from the Finder just like any application. You can place it in your Apple menu (eg Automated Tasks folder), on the desktop or wherever.


Disclaimer

Use these scripts at your own risk. Although these scripts have tested to be stable, due to bugs in AppleWorks, AppleScript or these scripts, they could cause problems including error messages, system freezes, lost data, rifts in the space time continuum. BareFeetWare takes no responsibility for any damage caused and Apple is unlikely to even know that these exist, far less support them.

Scripts

Scripts are organized by AppleWorks environment. Some scripts have their own page, some are directly downloaded from here, others are described on the environment’s (ie the heading) page. If not stated otherwise, the script was written for AppleWorks/ClarisWorks 5 only and probably won’t work with AppleWorks 6.

Draw
Drawing scripts deal with the drawing area of a document and the graphic objects therein.
    1. Circle grow & shrink
    2. Compare Text Frames to find what has changed between versions of a page layout document.
    3. Dashed Lines - replaces the selected lines with a series of dashes, with adjustable length.
    4. Draw a face with blue eyes and a red mouth.
    5. Grow the selected objects by a set number of pixels.
    6. Join Prism Corners - join the corners of two rectangles to make a perspective prism.
    7. Text Along Arc - shape the path of text around a curve.
    8. Show Properties of the selected graphic objects in a form.
    9. Show/Hide matching lines - make a set of lines visible, then invisible. Useful for non printing.

Text
Text objects include character, word and paragraph with properties such as font and style.
    1. Fraction - use superscript and subscript to format a fraction.
    2. Uppercase - apply to text in a WP doc, text frame or spreadsheet cells.
    3. Text Color - sub menu of items to set text colors. Includes automated "Add Color to Menu"
    4. Title caps - Uppercase the first letter of each word.
    5. Small Caps - all upper case with capitals replaced by slightly larger size.
    6. Sort Selection - sort the selected paragraphs.
    7. Unwrap Lines - remove hard returns from emails.

Word Processing
Word Processing scripts operate on the whole text body of the active document.
    1. Auto Spell Checker - Checks spelling of the front AppleWorks document, hilighting misspelt words.
    2. Bold Other - Formats every second word as bold. Written by Hugh Dixon, March 1999.
    3. Compare two documents, hilighting each successive difference.
    4. Count Paragraph Blanks - Counts the number of paragraphs in the front WP document. Also counts the number of blank paragraphs and calculates the number of non blank. Cross reference with AppleWorks' built in line count (Edit:Writing Tools:Word Count) to calculate the number of non blank lines (ie line count - count of blank paragraphs). Last updated 1999.06.10.
    5. Export for XPress - saves the text of the active document along with XPress format tags for bold, italic, paragraph style names etc.
    6. Extract Containing - searches for a given string, copying all paragraphs that contain it into a new document.
    7. Find Repeats - Search the text in the front window for any repeated words.
    8. Make an Index of your choice of words from the active document.
    9. Multiple Find - Automates multiple Find/Change in the front document. Change the script’s findChangeList property. The script works for find_strings of more than one character. 1999.01.07 by Mark Butcher.
    10. New with Today's Date - Opens a chosen document, inserting today's date as static text, at the beginning of paragraph 2. Configure this applet by dropping your preferred stationery document onto it. Thereafter, instead of opening the stationery document to create a new letter, open this applet which will open the stationery and insert today's date. 1999.03.20.
    11. Save Merged - save the WP document with merged data, one copy for each record.
    12. Table of Contents - make a table of contents.
    13. Underline to Italic - Finds any words in the front document with an underline style, changing them to italic. 1999.05.31.
    14. Web Publish with META tags, better title and less buggy HTML.
    15. WildCardReplace finds and replaces text according to wildcards.

File
File saving, opening and conversion.
    1. Auto Save - Three different applets to save unsaved modified documents at regular intervals.
    2. Batch Convert Files - convert all the selected files in the Finder to your choice of format.
    3. Convert to AppleWorks - batch convert any readable doc to current AppleWorks version.
    4. Convert to ClarisWorks 4 - batch convert to previous version. Modify for any other format.
    5. Convert to Excel - batch convert to Excel 4. Modify for any other format.
    6. Copy File’s Path - Pastes the front document's path into the document.

Spreadsheet
Spreadsheets contain cells, rows and columns.
    1. Draw Cell Borders - draw lines around selected cells, so you can change the border thickness and pattern.
    2. Shade Alternate Rows - set the fill color of even numbered rows in the selection.
    3. Separate First Words - Separate the first word of each selected cell from the rest of the words
    4. Running Total.
    5. Uppercase cells
    6. Alternate column widths
    7. Negative cells red
    8. Sort through columns
    9. Today in cell

Function Scripts
Function scripts make available extra functions for formulas in spreadsheet cells and database calculated fields.
    1. FormatCell will apply one of various specified formats to a chosen cell.
    2. FormatNum takes a numeric formula and returns that number as the text version.
    3. Lookup from one database to another. Simple relational database capability.
    4. Link Cell - link to a cell in another spreadsheet.
    5. Linear Regression calculates the slope and intercept of the best fit line. Also Power Regression and Exponential Regression.
    6. Median calculation. Runs as formula or on selected cells.
    7. Mode - custom statistical formula.

Database
A database document contains fields, records, layouts, searches etc.
    1. Audit Fields - list name, index and name of all fields.
    2. Compare. Lists the refs of all records that differ.
    3. Duplicate record many times.
    4. Replace the value of the selected field in all visible records.
    5. Web Publish a database with its own search form in three easy steps.

Other
Other scripts are listed here until enough exist for their own page.
    1. Envelope Maker. printing envelopes &/or individual mailing labels, using Palm Desktop (or Claris Organizer 2.0).
    2. Max View - window size.

Suggestions
We welcome your suggestions, along with others already listed.

© 1998 - 2000 BareFeetWare