Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run command and DOS window
Message
From
19/02/1999 12:39:37
 
 
To
19/02/1999 12:30:10
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00189351
Message ID:
00189358
Views:
16
>>SET CLASSLIB TO PROCESS
>>oAppTORun = CREATEOBJ('API_APPRUN',"doscommand",,'MIN') && run minimized
>>oAppToRun.LaunchAppAndWait()
>>oAppToRun= NULL
>
>thanks Ed and I Knew it I have seen this class somewhere..now
>>oAppToRun.LaunchAppAndWait()
>will this tell me when the application has finished executing or the DOS window
>disspaear?? kind like if it is > 0 or something then the app has finished??
>

This will make your VFP app pause until the other application terminates. If you use the LaunchApp method instead, control will then be returned to VFP immediately. You app could then poll the termination status of the other application using the CheckProcessExitCode method; the other app will have terminated when CheckProcessExitCode returns a value other than 259.

LaunchAppAndWait returns a logical; .T. means that the app ran to completion, and .F. means either that the app failed to start, or you aborted waiting on termination by pressing Escape when VFP had focus, and the program is still running. If .F. is returned, you can examine the icErrorMessage property to find out what the class thought had happened.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform