LOTUSSCRIPT LANGUAGE
You write a script in a space associated with an object and an event; LotusScript then attaches your script to the object and event. The LotusScript language is the same for all products, but the properties, methods, and events are defined for your specific product’s objects. After you select the object and event to which you want to attach a script, type the instructions you want to execute when the event occurs. For example, when the user clicks a command button, LotusScript runs the script that you defined for that command button "click" event.
Some products can automate parts of the scripting process, restricting or eliminating the need to use parts of LotusScript. For more information on your product extensions, see the product documentation.
Note From the script editor in many Lotus software applications, you can highlight a product object's property or method or a LotusScript keyword and press F1 to display a Help topic about the term or keyword.
Compiling scripts
An application must be compiled before it will load and execute.
When you compile a script, LotusScript displays messages about any errors it finds, listed in the order in which they are found. There are two types of errors:
For more information about errors, see "Error Processing."
Creating and using script libraries
Script libraries are shared compiled script modules. Some Lotus software applications allow you to write and compile script modules as files with an .LSO extension and then use these files in your applications. You create one copy of a compiled script module to use in multiple applications.
You create the script using your script editor, or any text editor. The script can contain LotusScript declarations, subs, and functions, and can define and declare product classes, properties, subs, and functions.
Note Notes does not allow you to save .lso files directly. Notes saves the object modules within itself.
To load a compiled LotusScript module, put a Use statement in a script at module level, before all implicit declarations. For more information, see the product documentation.
If you place the Use statement in a declarations section, any public declarations, subs, and procedures in the "used" module are available to the scripts in the corresponding module. If your Lotus software provides a Public script, place the Use statement in this script to make Public declarations and procedures in the "used" module available to the scripts in the application.
If you then change the name or extension of the module, LotusScript can’t use the script module, because the original file name is embedded in the compiled module. To change the file name, you must rename the source file and compile the .LSO file.
See Also