Other Content

Table Of Contents
530 Writing Lua Scripts
Setting Script Permissions
You can set permission levels for a script and specify a password to protect a
script. Follow these steps.
1. In the Script Editor window, click File > Set Permissions.
The Set Permissions dialog box opens.
2. In the Permissions Level area, select the appropriate security level:
Protected. The script can be run, but not viewed or edited.
View only. The script can be viewed, but not edited.
Unprotected. The script can be viewed and edited.
3. To secure a script, designate a password in the Security area.
Note: Use caution when setting passwords because they cannot be
recovered.
4. Click OK.
The next time you click Insert > Script Editor > EditScript, a Password Protected
dialog box opens prompting for the password. Choose one of these options:
To edit the script, enter the password and click OK.
To view the script only, do not enter the password and click View.
Debugging Scripts
You can debug your script to investigate runtime errors and trace the execution
flow. While debugging, data is displayed in the Tools panel.
To enable debugging mode or disable it and return to normal mode, click
Debug > Enable Breakpoints or Disable Breakpoints.
Note: Disabling breakpoints always resumes the script execution.
While debugging, click Step Into and Step Over as appropriate. See the
Exploring the Script Editor interface
section.
To set breakpoints, double-click in the space to the far left of the line
number. Breakpoints are disabled until you click EnableBreakpoints.
Note these factors when debugging:
Breakpoints in coroutines are not supported.