Introduction | Language Structure | IB Statements | File System | Comet 32 Runtime | Index |
| Syntax: | EVENTWAIT |
| Discussion: |
The EVENTWAIT statement causes Comet to wait for an event to occur. An event is some action that
is external to the program, such as a mouse click on a Comet hyperlink.
EVENTWAIT is placed in the program following an EVENTSUB statement. When the program executes the EVENTWAIT statement, Comet waits for the event to occur. In effect, the EVENTWAIT statement performs the same function as the WAIT statement, although without any screen interaction. Some important notes:
|
| History: | This statement was added in Build 311. |
| Example 1: |
Print (Hyperlink=... Print (Hyperlink=... Print (Hyperlink=... EVENTSUB GetEvent,Event$,Source$ EVENTWAIT . . . GetEvent: . . . EVENTSUB GetEvent,Event$,Source$ ! Re-establish event trap Return ! Return to EVENTWAIT |
| Example 2: |
Print (Hyperlink=... Print (Hyperlink=... Print (Hyperlink=... EVENTSUB GetEvent,Event$,Source$ EVENTWAIT STOP . . GetEvent: . . . EVENTSUB ! clear Eventsub trap Return ! Return to STOP statement |