docs

Home All functions Categories

vuRun(Filename, WStyle, Wait)

vuRun(*CSTRING,LONG,LONG), Signed

Description

Runs a program using the Windows Shell with the specified window style and wait behavior. This function is useful for launching support programs (for example, utilities or file conversions) in a controlled manner, including hidden execution.

Parameters

Parameter Data Type Description
Filename CSTRING(256) Fully qualified path and filename of the program to run. May include runtime parameters.
WStyle LONG Window style for execution:
0 = Hidden
1 = Normal with focus
2 = Minimized with focus
3 = Maximized with focus
4 = Normal without focus
6 = Minimized without focus
Wait LONG Execution wait flag:
0 = Return immediately, do not wait for completion
1 = Wait until the program completes

Returns

A LONG value:

Example

Filename = 'C:\Programs\Notepad.exe mydoc.txt'
WStyle   = 1   ! Normal with focus
Wait     = 1   ! Wait for program to complete

IF vuRun(Filename, WStyle, Wait)
  MESSAGE('Program executed successfully.')
ELSE
  MESSAGE('Failed to run program.')
END

Notes

Home All functions Categories