| Discussion:
|
This mnemonic launches a Windows program and pauses the InternetBasic
program. When the Windows program is done, the IB program resumes.
The parameters are:
Action$ = A verb associated with the file type. Typically
"open" or "play". To specify the default action, use "".
You can see the verbs for a given file type from the File Types dialog available
via the "View/Folder Options" menu item (in Windows Explorer).
Prog$ = The name of a program (e.g., notepad.exe) or a
document (e.g., myfile.txt)
Args$ = Additional command line arguments
WorkDir$ = The current directory to use when executing the Prog$
WinMode =
| 0 | Hides the window and activates another window.
|
| 1 | Activates and displays a window. If the window is
minimized or maximized, Windows restores it to its
original size and position. An application should
specify this flag when displaying the window for the
first time.
|
| 2 | Activates the window and displays it as a minimized window.
|
| 3 | Activates the window and displays it as a maximized window.
|
| 4 | Displays a window in its most recent size and position. The
active window remains active.
|
| 5 | Activates the window and displays it in its current
size and position.
|
| 6 | Minimizes the specified window and activates the next
top-level window in the Z order.
|
| 7 | Displays the window as a minimized window. The active
window remains active.
|
| 8 | Displays the window in its current state. The active window
remains active.
|
| 9 | Activates and displays the window. If the window is
minimized or maximized, Windows restores it to its original
size and position. An application should specify this flag
when restoring a minimized window.
|
| 10 | Sets the show state based on the SW_ flag specified in the
STARTUPINFO structure passed to the CreateProcess function
by the program that started the application.
|
Also see (ShellExecute).
|
| Example:
|
PRINT (ShellExecuteWait="open","program.exe","","",1)
wait ! REQUIRED for the "wait" effect of the ShellExecuteWait
where:
- Parameter 1 (open) is the action associated with an EXE file
- Parameter 2 (program.exe) is the program name
- Parameters 3 and 4 are not needed in this case (thus the "")
- Parameter 5 (1) activates and displays a window
Note: Either a WAIT or an INPUT is required to get the ShellExecuteWait to wait
for the "completed" status before returing to your IB program. Doing an INPUT also
allows you to get the result code returned.
|