UWAITFOR Command

The UWAITFOR command causes the process to wait until the Windows application, identified by var, terminates or the time specified by expr elapses.

Format

UWAITFOR var, expr THEN statement(s) ELSE statement(s)

Parameter(s)

var

Must be an identifier returned by UEXECUTE.

expr1

Time in seconds.

THEN/ELSE statements

If the UWAITFOR time expires, the ELSE clause is executed. If the application terminates, the THEN clause is executed.

Example

*

* Launch Notepad; Allow user 300 seconds to

* Complete edit. If not done in 300 seconds

* Close application for them.

*

UEXECUTE "NOTEPAD.EXE" RETURNING HANDLE

UWAITFOR HANDLE, 300 ELSE

  UMESSAGE TO HANDLE,16,0,""

END

See Also

O/S Interoperability Commands

UCLOSE Command

UCREATE Command

UDELETE Command

UERROR Function

UEXECUTE Command

ULOCK Command

ULSEEK Function

UMESSAGE Command

UOPEN Command

UREAD Command

UREADLINE Function

USYSTEM Function

UWRITE Command