uexecute command

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

Format

UEXECUTE <command> [RETURNING var]

Parameters

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 previously launched uexecute 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(s)

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,""