Corel scripts


Corel scripts are short programs that use the Corel SCRIPT programming language to automate simple tasks. For example, if you have a series of images that are underexposed, you can record the corrective adjustments as you apply them to the first photograph. You can then play the recording on all the remaining photographs to correct them simultaneously.

You can use the Recorder docker to create recordings, which you can save as scripts for future use. You can also use the Recorder docker to open, edit, and play recordings and scripts.

Create recordings and scripts

You can record a sequence of most keyboard, toolbar, toolbox, menu, and mouse operations. As you record, the operations are translated into command statements that appear chronologically in a command list. Each command statement is one word that is based on the name of a menu plus the name of a command found in that menu.

Some operations are converted to parameters that are embedded within a command. Parameters are recorded, but they are not displayed in the command list. For example, if you choose a paint color and apply a brushstroke to the image, the color selection is not displayed in the recorder’s command list; instead, it is recorded as a parameter of the paint tool command.

The following operations and commands cannot be recorded in Corel PHOTO-PAINT:

toolbar, keyboard, and menu customization
grid, ruler, and guideline customization
Window and Help menu commands
image calculations and image stitching
viewing operations, such as zooming

To make a recording accessible in a future Corel PHOTO-PAINT session, you must save it as a script. The scripts that you create can be loaded and played at any time.

You can also save a list of Undo actions as a script. For example, if you did not record the actions for an effect that you want to reproduce, you can save those operations as a script by using the Undo list. A script created from an Undo list includes all the operations you perform on an image; therefore, you may need to edit the script to isolate the commands you want.

Edit recordings and scripts

You can edit a recording or script by inserting new commands, recording over existing commands, and deleting the commands that you no longer want to include.

Play recordings and scripts

When you play a recording or script, the recorded commands are applied to the active image. You can play a recording only in the current Corel PHOTO-PAINT session. If you want to use the recording in other work sessions, you must save it as a script. Before playing a recording or script, ensure that the active image contains the components necessary for successful execution of the recorded commands. For example, if your script has commands that are specific to objects, it cannot be applied successfully to an image that has no objects.

You can apply a single command from a recording or script to an image. This feature is useful when you want to evaluate the result of a particular command before applying the rest of the commands in the recording or script to the image.

You can temporarily exclude some commands from a sequence before you play a recording or script. You can enable disabled commands without having to re-create the recording or script.

You can apply one or more scripts to one or more images simultaneously, which is known as batch processing. This feature lets you perform global adjustments on several images, without having to open each image and play each script individually. After batch processing, the images can be saved to their original file format or to a different file format.

To display the Recorder docker

Back to Top
Click Window Dockers Recorder.

To create a recording or script

Back to Top
1 Click the New button in the Recorder docker.
2 Click the Record button .
3 Perform the actions that you want to record.
4 Click the Stop button .
The recording is now complete and can be played in the current session.
To save the recording as a script for future use, click the Save button , choose the drive and folder where you want to save the script, and type a filename in the File name box.

*

If a document-saving command is the first action in a recording, you can restore the original image by returning to the first command in the recording.

To save the Undo list as a script

Back to Top
1 Click Windows Dockers History.
2 Click the Save script file as button in the History docker.
3 In the Save recording dialog box, choose the drive and folder where you want to save the script.
4 Type a filename in the File name box.

To open a script

Back to Top
1 Click the Open button in the Recorder docker.
2 Choose the drive and folder where the script is stored.
3 Double-click the script filename.

To insert commands into a recording or script

Back to Top
1 Create a recording, or open a script in the Recorder docker.
2 Click the Insert new command button .
3 Double-click the command that you want to precede the commands you insert.
The position indicator appears beside the selected command.
4 Click the Record button .
5 Perform the actions that you want to insert.
6 Click the Stop button .

To replace commands in a recording or script

Back to Top
1 Create a recording, or open a script.
2 In the Recorder docker, double-click the first command in the sequence of commands that you want to replace.
The position indicator appears beside the selected command.
3 Click the Insert new command button to disable it.
4 Click the Record button .
5 Perform the new operations.
6 Click the Stop button .

To delete commands from a recording or script

Back to Top
1 Create a recording, or open a script.
2 In the Recorder docker, hold down Ctrl, and click the commands.
3 Click the Delete selected command(s) button .

*

If you delete commands from a script, you must save the script before closing it to save the changes.

To play a recording or script

Back to Top
1 Create a recording, or open a script.
2 Click the Play button in the Recorder docker.

 

You can also
Play a single command
Double-click the name of the command you want to play. (The position indicator is displayed next to the command you have chosen.) Click the Step forward button .
Disable or enable a command
Disable or enable the check box to the left of the command name.
Disabled command names are grayed.
Go to the first command
Click the Rewind button .
Go to the last command
Click the Fast forward button .

To play scripts on multiple images

Back to Top
1 Click File Batch Process.
2 Click Add file.
3 In the Load images for batch playback dialog box, choose the drive and folder where the images are stored.
4 Holding down Ctrl, click the images that you want to edit, and click Open.
5 In the Batch process dialog box, click Add script.
6 In the Load script dialog box, choose the drive and folder where the scripts are stored.
7 Click the script that you want to play, and click Open. Repeat this step to add more scripts.
8 Choose an option from the On completion list box.
To save the files to a specific folder, click Browse, and navigate to the folder you want.
9 Click Play.

*

Choosing Don’t save from the On completion list box lets you assess the results before overwriting the original image.

Was this page helpful? Send feedback.


Some features documented in the Help are available exclusively to subscribers. For more information about CorelDRAW subscription, visit coreldraw.com.