Call situation of a script.

In placeholder scripts the constant specifies the call situation (load, write, ... ) of the script. In paneland Front Row actions the constant describes the frame index of the call.

Actions of placeholders. This actions are executed depending on the instructions of the user.
gRun script type description
-2 load load the content of a placeholder
-3 write write the content of a placeholder to the database
-4 status Does document still correspond to database content?
-5 structure structure of repeated sub-elements
-6 range list of all values, Not implemented
A complete description of the keywords used in the placeholders can be found here.

This actions can be called depending on the current document selection and activated via the corresponding panel menu.
gRun selection description
1, ..., n frames selectedAt least one frame is selected
0 no selection No frame of text has been selected
-1 text selection text tool active and text cursor placed

To execute a panel or front row script only once, regardless of the current document selection, simply add the following line at the beginning of the script:

if (gRun > 1) return 0;

[Since v4.3 R36210] As an alternative to the test of gRun, you can also write the following line (in exactly this notation) at the beginning of the script and at the start of a line:

#pragma once

If this pragma is set, the script is only ever started once, regardless of the current frame selection. The pragma also works in Python scripts.

See Also
Script Environment

Alphabetic index HTML hierarchy of classes or Java