Please enable JavaScript to view this site.

ESL Documentation

A response definition consists of two kinds of statements. A response statement specifies the stimulus, or event, that is to invoke a response. Action statements specify the actions that ESL is to perform when a particular stimulus is recognized.

Note: You can specify a response statement with zero action statements. For example, you might want to clear the buffer in response to certain characters that you know will be sent from an application; or, when you create a prototype interface, you might have a response to an object that will eventually send a string to an application.

 

For example:

 

response to MakeRed              # response statement

    make BigBox red              # action statement

    make BigBox visible          # action statement

    send "Red \n" to Recorder    # action statement

 

Each response statement specifies a stimulus to which ESL can respond. You specify a response statement as the first statement in a response definition. Following the response statement, you can specify any number of action statements. The complete set of response statements is as follows:

 

Response Statement

Invoked

response to start

When the ESL program is initiated, or when a block is first entered.

[interrupt] response to OBJECT

When the user selects an object.

[interrupt] response to item

When the user selects an action bar item.

[interrupt] response to line or

[interrupt] response to char

When the program receives data from the keyboard or from an application program.

response to low memory

When ESL reaches a specified threshold of available memory during runtime.

[interrupt] response to interval

At specified intervals (in seconds) during runtime.

response to stimulus

When a stimulus library generates an event.

[interrupt] response to timeout

When ESL does not receive any stimulus for a specified number of seconds.

response to termination

When a block is left implicitly.

 

In summary, ESL responds to the following stimuli:

Initiation of the ESL program, or of a defined block of responses.

Selecting an object on the screen (with any pointing device).

Selecting an item from an action bar on the screen (with any pointing device).

Entering data from the keyboard.

Receiving data from an application program.

Elapsed time.

When a stimulus library generates an event.

Lack of any stimuli during elapsed time.

When a block is left implicitly.