Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A Synchronous 'Run' command
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00509179
Message ID:
00514294
Vues:
16
Ed, that sounds like a great solution.

Thanks for your help.

Regards,

gerard



>>Hi.
>>I need to run a VFP application from within FPW, but want the FPW app to wait until the VFP app has finished. The 'RUN' command is asynchronous , so the minute it starts, control goes back to the FPW app.
>>
>>I've seen refernces here to Windows Shell scripting ,which might do the job, Has anybody any ideas of how this nmight work.
>>
>
>The easiest way to do this is to fire a batch file using RUN without the /N options; this will launch a command processor and wait until the batch file completes before returning control to FPW. Use the START verb with the /WAIT command line option to force the batch file to wait for the VFP app to terminate in the batch file (otherwise, the CLI will launch a WinApp and procede asynchronously rather than waiting for the WinApp to finish.) A sample batch file might read:
>
>
REM SAMPLE.BAT - wait on a VFP app to terminate
>ECHO OFF
>REM You can add command line switches to adjust the Windows display mode
>REM to the START line.  See you OS docs for details on START switches.
>REM Any command line switches for START must precede the executable name
>REM or they will be assumed to be parameters for the .EXE launched
>START /WAIT MyVFPApp.EXE parameter1 parameter2 "ad nauseum"
>EXIT
>
>This will fire a DOS box; you can adjust the DOS box behavior by creating a PIF for the batch file or modifying FOXRUN.PIF. I would suggest checking the Close on Exit checkbox in the PIF as well, or the DOS box may sit and wait on the user to close it manually when it finishes.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform