Script action: Go-To printer command
When the input variables are checked, the script action Go to label %PrinterCommand% is used to continue script action execution with the action Execute print job command that corresponds with the button pressed.

Figure 16 - Go to label %PrinterCommand% action
Now how does this work? For each of the possible printer commands, the script contains a separate section containing two script actions. The first action executes the specific printer command. The printer execution action contains a label so that the action can be jumped to. The name of the label corresponds with the value of the variable %PrinterCommand%. This value is set as a form action when the end user presses one of the form submit buttons. When the printer execution action is executed, the Go to label 'Ready' action is used to end the script.
Example: When the user presses the Restart button in the form, the variable %PrinterCommand% is set to RESTART. When the script is executed, the action Go to label %PrinterCommand% is executed as: Go to label RESTART. The RESTART label action executes the printer command to restart the printer document.

Figure 17 – Executing the print job command action
|