This simple example demonstrates how to edit a new script by editing the .constructor method.
/* Write the 'main line' of the program here. */ method HelloWorld.constructor () { }
pri
princ(
/* 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 A, Basic Troubleshooting.
Here's a way to evaluate just a part of your code:
princ("Hello world.\n");
This feature of the Script Editor lets you run any part of a script without running the whole thing.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.