Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pausing for completion of a RUN command
Message
From
21/11/2006 12:22:52
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
21/11/2006 12:15:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01171227
Message ID:
01171498
Views:
7
OK then blame word not me:)
Cetin

>I probably will work on it (for fun). Things like that tend to drive me crazy. :o)
>
>
>>Oh please do not spend time on it (unless you want to it for fun). I solved it another way w/o using createprocess (well used createprocess part but wait part changed). What I did was to enumerate all windows before call and after call and get window handle of new one, its processID etc. It surely had other problems (like some applications were spawning another window after their splash like one, closing main - ie: a game) but I somewhat followed process chain to track. And if all these weren't enough I had to use different API for win9x and NT.
>>I have a working solution in use for years but would like easier CreateProcess if I missed something basic:)
>>Cetin
>>
>>>OK, I'll try to look at it tonight. I guess you haven't already come with a solution or viable alternative (Using createprocess)? Ok, that was dumb, Silly me, you wouldn't have posted this if you had...
>>>
>>>
>>>
>>>>Recognizing when it terminates. I don't exactly remember the sequence but roughly what happens is:
>>>>
>>>>-Launch word instance 1 using this code (or similar)
>>>>-From another session launch another word
>>>>
>>>>One of them was immediately returning as if word is terminated (I dont' remember exactly as I said - it might be instead 2nd watcher is returning when 1st instance terminated, only one of them is waiting IOW and it was the case if I used WaitFor* winAPI too).
>>>>Cetin
>>>>
>>>>
>>>>
>>>>>I guess I could play around with it and see if it can be done. Which part failed? Does the app fail to launch or does the code fail to recognize when the process is terminated?
>>>>>
>>>>>
>>>>>>I didn't ask for him, asked for myself:) I thought I might have given up early.
>>>>>>Cetin
>>>>>>
>>>>>>>Honestly, no. I've only ever used it to launch non-automation supported apps from within VFP when I want to pause processing until the external app is closed. I wouldn't go this route for automation supported apps. Is he wanting to do that? I must have missed that part of the message...
>>>>>>>
>>>>>>>
>>>>>>>>Tracy,
>>>>>>>>Have you ever tried this with office applications like word? Last time I tried to build something around this it was failing (one of the instances were returning immediately - word behaves like an MDI while Excel like an SDI) if I call it for a 2nd instance of word and I gave up.
>>>>>>>>Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform