Shell Function

Syntax:
Shell(Name$[, WindowType])
Group: Miscellaneous
Description:
Execute program Name$. This is the same as using File|Run from the Program Manager. This instruction can run .COM, .EXE, .BAT and .PIF files. If successful, return the task ID.
Parameter Description

Name$ This string value is the path and name of the program to run. Command line arguments follow the program name. (A long file name containing a space must be surrounded by literal double quotes.)
WindowType This controls how the application's main window is shown. See the table below.
WindowType Value Effect
  1. Minimized Window (default)
  1. Maximized Window
  1. 8 Normal Deactivated Window
  1. 7 Minimized Deactivated Window
See Also: AppActivate, SendKeys.
Example:

Sub Main
X = Shell("Calc") ' run the calc program
AppActivate
X
SendKeys
"% R" ' restore calc's main window
SendKeys
"30*2{+}10=",1 '70
End
Sub