Shell(Command: String[, ShowWindow: Number, Wait: Boolean, Timeout: Number]): Variant
Shell function executes the external program Command. ShowWindow is an optional number parameter controlling display of the external program.
Returns -1 if the timeout is exceeded, 0 if the process cannot be launched, or ProcessID if the command completed successfully.
Shell function syntax has these named arguments:
Parameter |
Description |
|---|---|
Command |
Required. The external program to be executed. |
Show Window |
Optional. Valid values are as follows, Hide = 0 ShowNormal = 1 ShowMinimized = 2 ShowMaximized = 3 ShowNoActivate = 4 Show = 5 Minimize = 6 ShowMinNoActive = 7 ShowNA = 8 Restore = 9 ShowDefault = 10 |
Wait |
Optional. When True, the Shell function will wait for completion of the program. Defaults to False. |
Timeout |
Optional. The number of milliseconds to wait for completion if Wait is true. If this is omitted, an infinite time is assumed. |