Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run an EXE and wait for it to finish
Message
From
25/08/2004 11:58:48
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00936327
Message ID:
00936334
Views:
27
>I need to run an exe from our application and wait for it to finish, then continuing running our application. I have tried using the RUN command but it doesn’t wait for the other exe to finish. This needs to work with all versions of Windows from 95 to XP.
>

Hi John

Here is one idea..
run myapp.exe
do  while !isrunning('App window title')    && window title
    =inkey(0.1)                             && to share the processor time for others app.
enddo
wait window "My app.. has finished" nowait
return

Function isrunning
Parameter tcTitle

Declare INTEGER FindWindow in Win32API as FindWindow STRING, STRING

Return IIF(FindWindow(0,tcTitle)>0,.T.,.F.)
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Reply
Map
View

Click here to load this message in the networking platform