Whiskey Creek logo

PageMaker Scripting for Non-Programmers

by Diane Haugen

Marc Zeedar has created and maintains a PageMaker Scripting Center when he isn't otherwise occupied at providing lots of useful prepress information at Scott's Valley Printing.

Part of the reason I have a Mac is that I never wanted to be a programmer. But alas, the dreaded activity just seems to be cropping up everywhere, and I was finally driven to learn enough html to put up these simple Document Design pages.

But when it comes to programming with a capital P, as in writing something that actually runs a process, I stopped with MacroMaker, if any of you are old enough to remember it. It was a mac add-on that let you open up an application, go through a series of whatever repetitive things you wanted done, and then save the series of steps as a program which could be applied to similar situations. It didn't always work perfectly, and it took a while for me to get the steps just right to modify the style in all 500 parts tables I had created in Table Editor. And this was Table Editor 1.0. A lot of people still complain about Table Editor, but I always found it a lot more intuitive than that other brand. And MacroMaker had saved me a lot of time. Today, QuicKeys or One Click, popular commercial macro programs, are available. Both let users record and play back their actions.

So when PageMaker 5 came out with the ability to create scripts, I sort of ignored it. For some reason, I never could get the fraction script to work right and found it easier to just change to a type font that included real fractions.

Then Marc Zeedar began talking about the joy of scripting on the PageMakr list. And then he took pity on all of those who shy away from programming and decided to introduce us to what we were missing. Which lead to Marc's development of a PageMaker Scripting Center and scripting FAQ.

According to Marc, scripting is simply a method of automating complex or time-consuming tasks in PageMaker. He notes that at its most basic, it is very similar to the macro function of many software programs such as my old MacroMaker. A macro memorizes a series of menu commands, keyboard presses, mouse movements, or clicks, recording them for playback later with a single command.

With PageMaker's scripting, you must actually tell the program what to do. You cannot simply let the program "watch" your actions and "record" them as a script. You need to type in the script line by line.

Scripting cannot do anything PageMaker cannot do on its own, so you cannot write a script to make PageMaker draw a polygon shape. Nor does it allow you to interact with objects already on the page, unless you tell the script exactly where the object is or the object's number (PageMaker numbers each object as you create it). However, you can write a script that will go through and select each object on a page, check to see if it's a box or circle, and then set the line to the color "black." With a little more work you could make a script that would let you change all "red" items to "blue" (or whatever you wanted).

Plug-ins, however, can look for objects on a page and interact with them. Although they communicate with PageMaker the same way internal scripts do, they are external to the program and require "real" computer programming (with a compiled language such as C++).

Marc says "If you doing anything at all repetitive with PageMaker, such as a regular newsletter or a book design, you owe it to yourself to explore PageMaker's powerful scripting language." He encourages you to take a look at the sample scripts that come with PageMaker (like the Calendar script, for instance), and visit his PageMaker Scripting Center. The release of PageMaker 6.6 is imminent, and Marc notes that this upgrade is supposed to have increased scripting power.

So watch the Pagemaker Scripting Center. Right now the FAQ has a number of scripts, from simple to complex, but with the release of PageMaker 6.5, Marc plans to soon have the site overflowing with lots of exciting new sample scripts!

Return to List of Articles

Return to Document Design Online Journal

This page and all the images on it are © Copyright 1996, 1997, 1998, 1999, 2000, 2001 Whiskey Creek Document Design. All rights reserved.