Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to stop returning froma Run command
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00474805
Message ID:
00474837
Vues:
29
Gerard,

You can easily do it with WSH:

define SW_SHOW_NORMAL 1
#define SW_SHOW_MINIMIZED 2
#define SW_SHOW_MAXIMIZED 3
oShell = createobject("WScript.Shell")
oShell.Run("notepad.exe",SW_SHOW_NORMAL,.T.)

The .T. parameter tells it to run synchronously.
This will wait for your app to finish before continuing on.

Take a look at:
http://fox.wikis.com/wc.dll?Wiki~WindowsScriptingHost

or at the excellent series from George Tasker and Ed Rauh on WSH in www.vfug.org starting with the Sept 2000 newsletter.

>>>>>>>>>>>>>>>>>>>>>>>>>
>I have a FPW 2.6 app and in one place it calls a VFP simple app which sends data down a serial port to an external device.
>
>In my FPW 2.6 app it does a: RUN /N MYVFP.EXE
>Control is returned immediately to my FPW app, whereas MYVFP.exe can take a few seconds to run, and I only want to return to the calling App when my called App has finished. I tried putting a time delay in but this was not 100% satifactory as I am not quite sure how long the app will run for .. 3 seconds or 5 seconds or 7 seconds ......
>
>Is there any way of not returning to the calling APP until the called App has finished ?
>>>>>>>>>>>>>>>>>>>>>>>>>


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform