Understanding automation : What is automation? |
Many actions that you perform in the software can be combined with other, related actions into a single automated solution. Automating repetitive tasks saves time, reduces effort, and lets you perform operations that are too complex to perform manually.
Automation can be used by programmers and nonprogrammers alike.
Most macros are created to automate a series of tasks within an application. The simplest meaning of the term macro is the recording of a group of related actions that can be played back automatically, in sequence, whenever you need to perform them. Macros consist of instructions that are written in a programming language, and some programming languages provide access to additional, more advanced, actions that cannot be recorded.
• |
For the purposes of this documentation, a macro refers to a coded solution that performs tasks in the
application by automating functions and subroutines (see Using functions and subroutines).
|
Although you can record a sequence of actions in the software, the real power of automation is that you can add conditions and looping mechanisms to a recording. As an example, lets consider a simple macro that applies a red fill and a 1-point outline to a selected shape. By adding a condition and a looping mechanism to the code, you can produce a macro that seeks out each selected shape and applies only the fill to text shapes and only the outline to all other shape types.
After you create a macro, you can ensure that it has the desired outcome by setpping through its code one line a a time, or debugging it. When you are happy with the macro, you can keep it for future use and even share it with others.
The software includes sample VBA macros, which supply additional functionality, demonstrate automation in the suite, and provide sample code.
The following sample VBA macros are included for CorelDRAW:
Copyright 2013 Corel Corporation. All rights reserved.