This website is under construction
I use Javascript mostly for automating tasks in InDesign CS3 and CS4. Some of my recent scripts include one for drawing ISBN barcodes (or any kind of barcode). That is a real money-saver as well as a time-saver. I have one for concatenating numbers in back-of-the-book indexes (and altering all numbers should the pagination change as a result of insertion/deletion of pages, always in strict compliance with copy-editing rules about writing numbers between 10 and 19 in full, naturally). I have one that performs various transformations with footnotes, such as laying them out in "run-on" paragraphs or placing them in anchored text frames as marginal notes that flow with the text. I have a multitude of scripts for dealing with tables. I would rather spend time writing and polishing a script for my own private use than do a boring, repetitive task where human error is bound to creep in along with human anguish.
Most of my scripts are "bespoke" — tailor-made for the client — for automating specialized tasks involving the importation and manipulation of XML. Each client's needs are unique. I write scipts to order to maximize automation but minimize loss of control.
Here is a script for saving successive versions of an InDesign CS3 or CS4 document. If you set up a keyboard shortcut to run it, a single keystroke (such as F9) will save and close the active document, replacing it with a new, numbered version. If the document already has a number at the end of its name, the number will be incremented. If it doesn't have a number, the script gives it the numer 1, and puts it into a new folder at the same location. Subsequent runs of the script will save successive versions of the document, numbered incrementally, in the same folder. (An earlier version of this script needed the document to contain at least one text frame, but this issue has been resolved.)
Here's a script that adds a small text frame (like a label) to a graphic line, saying how long it is in millimetres (to two decimal places). It's a bit like a more permanent version of the measurement tool. If you delete the text frame, you are left with an ordinary graphic line. If you change the paragraph style it creates (called "Measure"), it will respect any changes in subsequent uses of the script in the current document.
(If you prefer to draw "engineers'" measurement arrows, with pointy arrowheads at each end, which can then be styled or deleted all in one go, download these two scripts.)
To make any script available to InDesign's Scripts Panel, paste it into the Scipts Folder. To use this particular script in InDesign CS3 or CS4, draw a line with the line tool (or select one that you drew some time before) then double-click the script's icon in the Scripts Panel.
I make alterations to scripts in an ongoing way, so be sure to get the latest versions of any free scripts from my site.