Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run dos program and wait.
Message
 
To
09/08/2004 16:37:27
Scott Sherman
Puyallup Tribal Health Authority
Tacoma, Washington, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00931875
Message ID:
00931937
Views:
18
>>I have the need to fire off a DOS program but I need know when it finishes. If I use the below code, the program kicks off just fine but it is in no wait mode so I have no idea when it finishes. If I remove the /N from the RUN statement in hopes that the FoxPro program with wait, the program crashes. Does anyone have any idea how I can make FoxPro wait for the DOS program? The help says something about .pif files but I do not know how to create or use these either.>>

One way is to create a .pif files by right clicking your executable dos program,select properties, under Program tab, click change ICON, removed check mark closed on exit if have check on it then put an Icon to it.

Other way is, if you can manage to recompile your calling dos program to return a logical value and make it as your condition before your next line of VFP code is executed. (As terry mentioned, next line of code on your VFP will be executed even your dos program is still doing its task.) If you want your VFP code to wait for the dos program to finish..

See Passing & returning parameter values on help..

DO While !lFinish
*// Your VFP CODE
Enddo
Jojo R. dela Cuesta, B.Sc.
eConsultant, Programmer
Dalplus Technologies
http://www.dalplus.com
Previous
Reply
Map
View

Click here to load this message in the networking platform