Scripts


You can save time by using a JavaScript script to automate a series of repetitive tasks.

The Scripts inspector (File Scripts Scripts) provides easy access to scripts. Scripts are organized in modules. You can use the Scripts inspector to create new modules, and to load and record scripts. You can also use the Scripts inspector to rename and delete scripts.

You can record scripts and save them for later use. You can also record temporary scripts for actions that you need to repeat only a few times. A temporary script is accessible until a new temporary script is recorded.

*

Before recording a script, make sure that you know exactly which actions you want to record and the order in which you want to record them. When you start recording, the script recorder captures every change that you make in a drawing. For example, if you create a shape, resize the shape, and then change its color, the script records all the changes. When you are done making the changes, you must stop recording the script.

You can perform the actions that are associated with a script by playing that script. You can also play a temporary script.

To create a script module

Back to Top
In the Scripts inspector, click User Scripts, and then, click New New Module.
To hide all modules in the list and show only the list of scripts, click the Simple mode button .

To load a script

Back to Top
In the Scripts inspector, click Load, and then choose a script.

To record a script

Back to Top
1 Click File Scripts Start Recording.
The Record script dialog box appears.
2 In the Macro name box, type a name for the script.
3 Type a description of the macro in the Description box, and then click OK.
4 Perform the actions that you want to record.
The application begins recording your actions. If you want to pause recording, click File Scripts Pause recording. Repeat this step to resume recording.
5 To stop recording, click File Scripts Stop Recording.

 

You can also
Save the actions in the Undo list as a script
Click Window Inspectors History, perform the actions that you want to record, and then click the Save as a script button in the History inspector.

*

You can cancel recording a macro, and discard any commands recorded thus far, by clicking File Scripts Cancel Recording.

You can also record, pause, and stop recording a macro by using the Scripts inspector (File Scripts Scripts).

 

To record a temporary script

Back to Top
1 Click File Scripts Record Temporary Script.
2 Perform the actions that you want to record.
The application begins recording your actions. If you want to pause recording, click File Scripts Pause Recording. Repeat this step to resume recording.
3 To stop recording, click File Scripts Stop Recording.
The script is temporarily saved to the default recording project. When the current session is ended, the script is deleted from that project.

*

Not all actions can be recorded.

* 

You can cancel recording a script, and discard any commands recorded thus far, by clicking File Scripts Cancel Recording.

You can also pause and stop recording a temporary macro by using the Scripts inspector (File Scripts Scripts).

To play a script

Back to Top
In the Scripts inspector, click the script in the list, and then click the Run button .

To play a temporary script

Back to Top
Click File Scripts Run Temporary Script.

*

This option is enabled only after you record a temporary script.

To edit a script

Back to Top
In the Scripts inspector, click the script in the list, and then click the Edit button .

To rename a script

Back to Top
In the Scripts inspector, click the script name twice and type the new name.

To delete a script

Back to Top
In the Scripts inspector, click the script in the list, and then click the Delete button .

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.