Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

PageMaker Scripting FAQ

Welcome to the PageMaker Scripting FAQ (Frequently Asked Questions). If you think you might be interested in scripting Adobe PageMaker, this document should answer most of your initial questions. It covers the limitations and major features of PageMaker’s scripting language. It is not a tutorial but a reference–you are expected to do the learning on your own.

A. What is scripting?

Scripting, at its most basic, is simply a method of automating complex or time-consuming tasks in PageMaker. In that sense it is very similar to the macro function of many software programs. (A macro is a memorized series of menu commands, keyboard presses, or mouse movements and clicks which can be recorded and later played back with a single command, accomplishes several steps in one.)

For instance, let us say you often switch between two print settings: tiled and “fit to page”. You could easily write two simple scripts which would toggle the current setting. (Of course this example is moot in PageMaker 6.x which has printer styles built-in.)

The biggest difference between a macro language and PageMaker’s scripting language is that you cannot simply “record” your actions as a script. With PageMaker, you must type in the script line by line. This makes scripting a bit more daunting (but no less effective).

Scripting with PageMaker 6.5 adds new capabilities beyond simple macros–like the ability to have the script analyze information and make decisions based upon what it discovers. (Technically this is called programming, but don’t let that scare you–it’s still very easy.)

B. What can scripting do?

First off, scripting cannot do anything PageMaker cannot do on its own. You cannot use scripting to make PageMaker draw a box with a gradient fill, for example (although you can simulate it). Scripting uses PageMaker’s built-in commands and data types–you cannot add new types of graphics or new features.

So what good is scripting? Well, scripting is very useful for automating frequently used or repetitive tasks. For instance, many people use PageMaker’s scripting to link database software to PageMaker. (Note that this can require the use of additional communication between the software programs such as AppleEvents on MacOS systems or DDE under Windows.) This can allow you to combine the current elements of your database into a fully formatted PageMaker document.

A few years ago BMUG (Berkeley Macintosh Users Group) used Userland’s Frontier (similar to AppleScript) and PageMaker scripting to take information from 22 separate “FileMaker” databases and incorporate that into their 700+ page disk catalog (descriptions of shareware available in their archive). It took six weeks to write the scripts to do this, and the final script ran for ten straight days! But this was an incredible savings… the previous catalog had taken four months of tedious manual layout.

Obviously, the BMUG example is extreme. Few people have projects so ideal for scripting. Most of us want simple shortcuts and methods to customize PageMaker so it works the way we want it to. Scripting is ideal for this, and simple enough that anyone can use it.

C. What can’t scripting do?

What you do with PageMaker scripting is dependent upon several factors:

  • which version of PageMaker you are using
  • whether or not your task involves linking PageMaker to other programs
  • how familiar you are with other scripting languages that can talk to PageMaker
  • how much “programming” you wish to do

The first decision–which version of PageMaker–is critical, because Adobe revamped PageMaker’s scripting language completely for version 6.5, turning it into a real language for the first time. For most practical purposes, use 6.5 for scripting complex projects. This FAQ is going to primarily deal with scripting for 6.5, though scripts and topics will indicate if the script or commands work in 6.0.

PageMaker 6.0’s language is extremely limited. The main limit of PageMaker 6.0’s scripting language is that it has no control structure. This means a PageMaker script runs linearly from start to finish with no stopping or switching. In an actual programming language, you can test for conditions, create repeating loops, and manipulate information. The PageMaker 6.0 scripting language does not allow any of these features. See Figure 1 for a diagram of this difference.

faqfig01 picture

For maximum flexibility, you need to use PageMaker 6.5 or an External scripting language to control PageMaker. Without conditionals you have to know a great deal more about your document (the exact number of boxes, for example).

Basic PageMaker scripting is very limited, though it does have its uses.

D. What equipment do I need to use scripting?

For very basic scripting you need PageMaker 4.2 or better. That’s it. For useful scripting, PageMaker 6.5 or better. With either method you can use other tools which can interact with PageMaker. For example, Visual Basic under Windows, or AppleScript, Userland Frontier, HyperCard, QuicKeys, or One Click under the MacOS. These other programs can communicate with PageMaker, sending it scripting commands.

E. What’s the difference between scripting and Plug-ins?

Plug-ins (formally called Additions), add capabilities to PageMaker. They are written in C++ according to strict guidelines Adobe publishes. (You can find the PageMaker Software Developers Kit on Adobe’s web site: http://www.adobe.com.)

What is most interesting about Plug-ins is that they use the same scripting methods of ordinary scripts! They do this much faster than regular scripts, however, and usually disable script redraw while they do their magic. Plus, because they are written in a high-level language, they have the ability to display complex dialog boxes and windows that the standard PageMaker scripting language does not support.

For maximum user interaction a Plug-in would work much better than a script, but scripts are much easier to write and edit than C++.

Comments