Newlook scripts and macros use the Newlook Object Model.
All objects in Newlook have properties, methods and events that can be used to control their behavior and appearance.
Note Refer to the Reference section of Help for a complete list of properties and methods that can be used in Newlook.
Individual properties differ as to when you can set or get their values. Some properties can only be set at design time - these are referred to as design-time only properties. These properties can only be set via the properties panel in Designer and cannot be set via a script or macro. Other properties are not available at design time, these are referred to as run-time only properties; they can only be set via a script or macro. Most properties are both; that is, they can be set in Designer and/or via a macro or script.
Properties that you can set and get at run time are called read-write properties. Properties you can only read (get) at run time are called read-only properties.
The value of a property is typically set when you want to change the appearance or behavior of an object. For example, to change the contents of a text box, you would change the Text property of the relevant text box control - either dynamically at run-time or in Designer.
Usually, you get the value of a property when you want to determine the state of an object before performing additional actions in your code (such as assigning the value to another object). For example, you might want to return the Text property of a text box to determine what its current value is before running code to change its value.
In most cases, to get the value of a property, you use the following syntax:
objectname.property
An event is an object action or occurrence recognized by Newlook. For example, the Form object will trigger an event whenever a new screen is received. You can write macros to be executed whenever specific events occur.
All objects in the Newlook object model contain a group of special properties which allow you to assign logic to various events. These properties have the syntax On<event>
.
For example, to specify logic that you want to run each time the Receive event of a Form is triggered, you would set the OnReceive property of the form to the name of the macro that you wish to execute. The macro that you nominate will be executed every time the Receive event is triggered for this form.
A method is a function or procedure that can be called from a macro or a script to perform some specific functionality on the object. For example, when used in conjunction with the Function Keys collection, the Add method adds a new function key.
You can access methods via the Script Editor or via the RunMethod action in the Macro Editor.
Writing and Debugging Macros | Newlook object Model
© 2004-2021 looksoftware. All rights reserved.