In this example, you can access the new script by sending either of the following commands:
beepTwoSec1200()
script.user.scripts.beepTwoSec()
To access the unnamed script, you can send the command:
beepTwoSec()
Figure 105: Create a new script with the name of an existing script
Rename a script
You can rename a script. You might want to rename a script if you need to name another script the
same name as the existing script. You could also rename an existing script to be the autoexec script.
To change the name of a script, use the command:
scriptVar.name = "renamedScript"
Where:
After changing the name, you need to save the original script to save the change to the
name attribute.
For example:
beepTwoSec.name = "beep2sec"
beepTwoSec.save()