AdderScript

as mentioned in the March-April issue of MacToday magazine

AdderScript is a pseudo-calculator.... Well, it's more of an adding machine since all it can do is add and subtract. But it's (A) good at finding and adding up numbers buried in sentences, and (B) it's AppleScriptable.

How does it work?

(1) Copy some text containing numbers.

(2) Paste it into AdderScript's big field.

(3) Click in the bottom field; all the numbers in the top field are added and the total presented in the field you just clicked.

That's the simple version. But you can save yourself all that copying/pasting/clicking if your word processor is AppleScriptable. I've included a sample AppleScript for Tex-Edit (shareware, the latest version is available at <http://members.aol.com/tombb>). Using AppleScript and Tex-Edit, all you need to do is select text containing numbers to add, then run the AppleScript. The total appears right in your document!

AdderScript does have some limitations, aside from only adding and subtracting. For one, numbers must stand by themselves. Thus, Toys4U won't be treated as a "4". For another, AdderScript is HyperCard based, and HyperCard treats everything in quotes as a single word. A number, naturally, doesn't contain spaces. AdderScript sees "4 5 6" as a word because of the quotes, and this word is not a number because it contains spaces. There's probably more limitations, but they haven't come around to sting me yet.

If you like AdderScript, go ahead and use it. If you want to tweek it, go ahead and do that too. If you want me to tweek it, well, drop me a line and we'll see if something can be worked out. I'm not making any promises!

AdderScript is freeware. ..remember, you get what you pay for. I'm posting AdderScript as I referred to it in a as-yet-unpublished MacToday article. (When the article appears I'll reference it here.)

Here is the HyperCard source (binhexed), (about 11k) and here is the standalone version (also binhexed) (about 1.2 megs). Both contain sample AppleScripts. Each has been compressed using CompactPro; StuffIt Expander should be able to open either of them.

 

Last updated: 6/18/98

Back to the Elaborations Index

Back to Robert's Home