Edit/Run


The Edit/Run macro tool is found in the ZPL Macros section of the Programming Tab.

This tool edits or runs the specified macro.
To run a ZPL macro, select the Edit/Run button in the ZPL Macros section of the Programming Tab. Select the macro to run from the "Active File" list, and then click on Execute.
OpticStudio will begin running the macro. The entire macro will run, and any text output from PRINT commands or error messages will be displayed in a window. The display of this output window can be suppressed using the CLOSEWINDOW keyword.
This ZPL control dialog has the following options:
Active File A drop-down list of macros available. All the listed macros are text files ending in the extension .ZPL. The files must be in the folder for ZPL Macros; see " Folders ". Macros may also be placed in any subfolder within the macros folder.
Close After Execution If checked, the ZPL control dialog box will automatically close after the macro execution.
Quiet Mode If checked, the default output text window will not be shown. This is useful for graphics macros that do not generate useful text.
Check Obsolete Syntax If checked, OpticStudio will test the macro for use of obsolete syntax.
Status During execution of the macro, OpticStudio will use this area to print a status message stating the line number of the macro being executed. The status message is updated every quarter second.
Execute Click to begin execution of the selected macro.
Terminate The terminate button will stop execution of the macro currently running.
Cancel The cancel button terminates the current macro if one is running. If no macro is running, cancel closes the ZPL control dialog box.
Edit The edit button invokes OpticStudio's text editor which can be used to modify or rename the macro. This editor colors the macro text using the following ZPL syntax:
Syntax Category | Color |
Comment | Green |
String | Violet |
Number | Light Blue |
ControlKeyword | Blue |
FunctionKeyword | Brown |
Identifier | Black |
For example, see the following screenshot of a sample macro:

The text editor also contains a search bar that can be opened by clicking the "Find text" button in the tool bar.

Next: