Writing application-level scripts
When a user runs an application, an Open event is triggered in the
Application object. The script you write for the Open event initiates
the activity in the application. Typically it sets up the environment
and opens the initial window.
When a user ends an application, a Close event is triggered in the
Application object. The script you write for the Close event usually
does all the cleanup required, such as closing a database or writing a
preferences file.
If there are serious errors during execution, a SystemError event
is triggered in the Application object.
Batch applications
If your application performs only batch processing, all
processing takes place in the script for the application Open
event.
The following table lists all events that can occur in the
Application object. The only event that requires a script is
Open.
|
Event |
Occurs when |
|---|---|
|
Open |
The user starts the application. |
|
Close |
The user closes the application. Typically, you |
|
SystemError |
A serious error occurs at runtime (such as trying For more about |
|
Idle |
The Idle PowerScript function has been called and |