Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Russell Hill
  Where is Russell Hill?
 Sydney
 Australia
 Russell Hill
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: Listboxes looping
Thread ID: 228609 Message ID: 228651 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: XML
Date: Wednesday, May 20, 2009 1:38:00 PM         
   


> Hi Russell,
>
> > I've found when using ShellExecute that I need to place Messageboxes in places to make sure the bat file processing is actually finished before moving on. Otherwise the first process hasn't finished when the second begins. That prompts my question in this case.
> >
>
> You can implement a "run and wait" sequence via CreateProcess(), OpenProcess, WaitForSingleObject() and related API functions.
> IIRC, there are a few related downloads at www.universalthread.com, Downloads section, "Run And Wait", "Api_Apprun" etc.
>
> Or, if you can make sure that WSH is always available, try WScript.Shell Run():
>
> Local loShell As WScript.Shell, lnSuccess
> loShell = CREATEOBJECT('WScript.Shell')
> lnSuccess = loShell.Run('calc',1,.T.) && the 3rd one is the "Wait" parameter
> Return (m.lnSuccess = 0)
> 

>
>
>
> hth
> -Stefan
>
>
>

Thanks a lot Stefan.

ENTIRE THREAD

Listboxes looping Posted by Russell Hill @ 5/20/2009 10:13:42 AM
RE: Listboxes looping Posted by Stefan Wuebbe @ 5/20/2009 12:18:27 PM
RE: Listboxes looping Posted by Russell Hill @ 5/20/2009 1:38:00 PM