Checking for pending messages

checkevents

Check for pending messages


SYNTAX

checkevents

Check for messages, such as incoming DDE requests from a client program, which are queued by the operating system and sent to the server program when the server makes a check.

Checks for messages are also made automatically by Sculptor. When a program is executing an interactive command, Sculptor loops to check for messages. When non-interactive commands are being executed, checks are made at a frequency controlled by the Sculptor system variable sys.AutoEventCheck. If this variable is set to zero, then the checkevents command must be used to ensure that events are registered, unless the program is waiting in an interactive command such as dialog, in which case it loops to check for messages.

If a DDE client message is found, Sculptor calls the server program’s DDE event function, suspending program execution until the function returns. The function should not change variables or access files in any way that may affect the interrupted program logic.

Very frequent checks may impair performance, but it should also be noted that a DDE request may time-out if it is not answered.


EXAMPLE

This example switches off automatic checks while files are updated:

sys.AutoEventCheck = 0
UpdateFiles()
checkevents
sys.AutoEventCheck = 50

RELATED TOPICS

DDE

sys.AutoEventCheck

sys.DDETimeout