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~WindowsScriptingHostor 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 ?
>>>>>>>>>>>>>>>>>>>>>>>>>