Corel Ventura Automation (Scripting) Help

I spend a fair amount of time automating Ventura with scripts, both in my own prepress work and in developing custom automation solutions to solve problems and increase efficiency at other companies as well. At heart I am a teacher, and I enjoy participating in a volunteer capacity in the Corel Ventura newsgroups. Here, scenarios are periodically raised that call for automated solutions, so I decided to start a page to help others learn how to automate Ventura for themselves. It’s far from complete; I’ll add to it when I can find the time, and post a notice in the Ventura newsgroups when I’ve done so.

--Abe Hendin, AtYourSpeed
[Last updated 10/16/2003]

Getting Started (Recording Commands)

The best way to get started with automating Ventura (writing scripts) is to record a series of actions that you’d like to repeat, then save the recording, study the commands/syntax recorded in the resulting plaintext Corel SCRIPT file, and edit as necessary. Many commands cannot be recorded and a few of those that can are not recorded correctly, but a recording is nevertheless an excellent starting point.

To record a series of actions, follow the instructions outlined below. [The figures derive from Ventura 10, but do not differ substantially from those in Ventura 8.]

  1. First, display the “Recording and Script” toolbar if you haven’t already done so: right-click in the toolbar area and check the “Recording and Script” toolbar entry on the contextual menu that pops up (Figure 1). You should see the toolbar displayed in Figure 2 appear in the toolbars area.
    Figure 1spacerFigure 2
    spacerFigure 1spacerFigure 2
  2. Click the round red button to start recording (cf. Figure 2).
  3. Do the actions you’d like to record.
  4. Click the square black button to stop recording (cf. Figure 2, in which the button is grayed-out because there was no recording to stop at the time I created the figure).
  5. Click the disk icon button with the green triangle at its right to save the recording (cf. Figure 2). The “Save Script” dialog will pop up:
    spacerFigure 3
    spacerFigure 3
  6. CAUTION: Be sure you click the “External...” button in the “Save Script” dialog. DO NOT click “OK”! [Saving scripts internally was a possible cause of some apparently unrelated problems in V8, and I’m not sure the problem was fixed in V10. Better safe than sorry in this case. Anyway, you may want to edit it, and this is most easily accomplished when the script is external.]
    The “Save Recording” dialog will pop up:
    Figure 4
    spacerFigure 4
  7. Choose the location to save the file, name it, then click Save.
    The easiest place for a beginner to save it in the long run may be (assuming that you chose to install Ventura in the default location):
    spacerVentura 10:
    spacerC:\Program Files\Corel\Ventura 10\Ventura\Scripts
    spacerVentura 8:
    spacerC:\Program Files\Corel\Graphics8\ventura\Scripts
    The contents of these folders will be displayed in the Options dialog; here you can assign keyboard shortcuts to your scripts and assign scripts to toolbars. [These folders are also the default folders for Ventura’s Navigator (Scripts), though in Navigator you can change the scripts source folder.]
    Tip: I keep a few temporary filenames (e.g. “!!”, shown in Figure 4) so I can simply double-click one of them to save a recording. The exclamation points keep these files at the top of the file list for easy access. If you use this method, be sure you save the file to a new name if you want to retain a permanent copy.

Now you’ve got a simple Corel SCRIPT text file with the “.csc” extension, in which the series of actions you just executed have been translated into commands. Open this file for viewing/study/editing in SCRIPT Editor 8, if you have it (it is included with Ventura 8, but not with Ventura 10). Otherwise, open it in any plaintext editor (my current favorite is TextPad).

Where to Go from Here

For detailed information about Corel SCRIPT and Ventura commands, functions, and syntax, see the following online help references (again assuming the default install location):
spacerVentura 10:
spacerC:\Program Files\Corel\Ventura 10\Programs\VENT_SCR.hlp

spacerVentura 8:
spacerStart Help from within SCRIPT Editor 8.

I’ve learned a tremendous amount by studying others’ scripts, and from the answers to my scripting questions in the Corel Ventura newsgroups. We have a number of public-domain scripts available here; many of them derive from early in my scripting career and could be improved, but you’ll find a number of basic operations there. See also the Ventura FAQ for additional resources: look for the “Ventura references” entry in the “Ventura General” section (I’ve linked it directly, but the link changes whenever the FAQ is updated).

Especially useful, though I myself now do a few things differently, is Alex Vakulenko’s “CorelSCRIPT Tutorial”, which can be reached from his Learning CorelSCRIPT page. This tutorial seems, unfortunately, to be in a permanently unfinished state, but it does cover many important areas as far as it goes.

A Note on Scripting in Ventura 10

Corel did not package Corel SCRIPT Editor with Ventura 10. This does not mean, however, that you cannot write scripts for Ventura 10, just that it is more difficult. Your best option is to find a copy of Ventura 8 -- it comes with SCRIPT Editor 8, which includes full debugging capabilities, visual distinction of syntax elements (color coding), and automatic indenting to assist with maintaining clear code structure -- it’s therefore worth every penny if you’re serious about scripting (of course, once you understand the power that scripting unleashes, you will be!).

If you cannot find a copy of Ventura 8, you can use any plaintext editor to write and edit scripts, because they are simple text files. You’ll have to debug manually, however; no small matter. The better editors offer the ability to develop a syntax file that would enable the editor to distinguish elements visually and provide automatic indenting just as in SCRIPT Editor. As I mentioned above, my current favorite is TextPad.

Ventura Newsgroups

The best resource for comprehensive volunteer Ventura support is the online newsgroups hosted by Corel. The folks who volunteer their time there are the most knowledgeable people around when it comes to Ventura and its quirks (and a number of other topics) because most of them work with Ventura on a daily basis. They’re also among the most respectful and helpful folks around. No question is discounted as “dumb” because even the experts sometimes learn something new from a beginner question, and even experts get stuck now and again.
Head to the newsgroup appropriate to your version with beginner questions, for timely support when you’re on deadline and at the end of your rope on a seemingly insurmountable problem, or just lurk and learn when you have a free minute. You won’t be sorry!
spacerVentura 10 newsgroupspacer Ventura 8 (and older) newsgroup