This simple example demonstrates how to edit a new script by editing the
.constructor method.
Create a new script whose main class is called
'HelloWorld'. Here's how.
The body of a typical script is written as part of the
.constructor method. Find the following lines to
start editing:
/* Write the 'main line' of the program here. */
method HelloWorld.constructor ()
{
}In between the brackets of the .constructor method,
enter the following:
pri
Notice that a drop-down box appears:

This box will appear any time you begin to write a function or variable name that is already available in the Gamma engine.
Continue writing:
princ(
The box now shows you the princ function syntax, in this case a
symbolic expression (s_exp), commonly know as a symbol.
Please refer to the Gamma manual for more information about function syntax
and arguments.
Continue editing the princ function until your
.constructor function looks like this:
/* Write the 'main line' of the program here. */
method HelloWorld.constructor ()
{
princ("Hello world.\n");
}Click the blue arrow icon
in the Script Editor toolbar to run the script, and then check
the results in the Script Log window:

If you don't get a 'Hello world' string in the Script Log, see
Appendix 1, Basic Troubleshooting.
Here's a way to evaluate just a part of your code:
In the Script Editor, use the cursor to select just the text:
princ("Hello world.\n");From the menu, select .
You should see the string 'Hello world.' appear in the
Script Log.
This feature of the Script Editor lets you run any part of a script without running the whole thing.