UEXECUTE Command

The UEXECUTE command allows users to execute various Windows programs from within mvBASIC.

Format

UEXECUTE <command> [RETURNING var]

Parameter(s)

command

Any valid Windows program within quotes.

var

Contains an identifier used in a UMESSAGE or UWAITFOR command.

Description

If the RETURNING clause is used, the specified var contains an identifier used in either a UMESSAGE or UWAITFOR command. This identifier is only valid while the UEXECUTE-launched command is running.

If the RETURNING clause is not used, the UEXECUTE command does not return control to the mvBASIC program until the launched command terminates.

Example

To execute the Windows program NOTEPAD:

*

* Launch notepad. Program will not resume

* until notepad is terminated.

*

UEXECUTE "NOTEPAD.EXE"

*

* Launch Notepad; sleep for 2 seconds then close

*

UEXECUTE "NOTEPAD.EXE" RETURNING HANDLE

SLEEP 2

UMESSAGE TO HANDLE,16,0,""

See Also

O/S Interoperability Commands

UCLOSE Command

UCREATE Command

UDELETE Command

UERROR Function

ULOCK Command

ULSEEK Function

UMESSAGE Command

UOPEN Command

UREAD Command

UREADLINE Function

USYSTEM Function

UWAITFOR Command

UWRITE Command