Thanks Alan also found this which seems to work very well ... https://www.berezniker.com/content/pages/visual-foxpro/check-if-exe-running-and-optionally-terminate-it
-----Original Message----- From: ProfoxTech <profoxtech-boun...@leafe.com> On Behalf Of Alan Bourke Sent: 09 June 2021 11:40 To: profoxt...@leafe.com Subject: Re: ShellExecute * -- https://docs.microsoft.com/en-us/previous-versions//d5fk67ky(v=vs.85) Function RunUsingWSH(lcExe, lcCommandLine) as Integer Local loWshShell loWshShell = CreateObject("WScript.Shell") this.nProcessReturnCode = loWshShell.Run(lcExe + " " + lcCommandLine, 1, .t.) && Wait for result. Endfunc -- Alan Bourke alanpbourke (at) fastmail (dot) fm On Wed, 9 Jun 2021, at 10:33 AM, Chris Davis wrote: > Hi All > > I want to ShellExecute a program repeatedly but not until the previous > instance has finished, what's the best approach? So I effectively > want to wait in a loop until the previous instance exits and then run > it again. > > Ideas? > > TIA > > Chris. > > > --- StripMime Report -- processed MIME parts --- multipart/alternative > text/plain (text body -- kept) > text/html > --- > [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/cwlp123mb33162651fe5f6b41decbc3fe8f...@cwlp123mb3316.gbrp123.prod.outlook.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.