Original question: How can I use some kind of function that executes an application and waits until this application finishes? Some kind of ExecuteAndWait!
Bill Thoen gave me an easy solution: If using a command line I could add the /wait parameter. Why didn't I think of this myself ? John Spotten pointed me to Jacques Paris website (http://www.paris-pc-gis.com) where I could find an implementation of the ExecuteAndWait functionality. Unfortunately the link to the site where this example was placed was broken, so I was not able to retrieve this example. Have you fixed it, Jacques ? The ultimate solution came from Bo Thomsen who had packed the API functions into a simple and easy to use Delphi DLL which very easily could be called from within MapBasic. If anyone is interested, let me know and I'll send you the DLL and sample code - upload it to directionsmag. Bo has allowed it. Thanks Bo. Martin Higham, Mickey Feldman and Ian Thomas also gave me some comments and ideas. Thank you all. Cheers, Peter Horsb�ll M�ller GIS Developer Geographical Information & IT COWI A/S Odensevej 95 DK-5260 Odense S. Denmark Tel +45 6311 4900 Direct +45 6311 4908 Mob +45 5156 1045 Fax +45 6311 4949 E-mail [EMAIL PROTECTED] http://www.cowi.dk > -----Original Message----- > From: Peter Horsb�ll M�ller [mailto:[EMAIL PROTECTED] > Sent: Friday, 2 April 2004 16:03 > To: [EMAIL PROTECTED] > Subject: MI-L Using WinExecute with wait > > > Hi, > > Has anyone tried using some API function to start an application and > wait for this application to finish ? > > I know about the WinExecute but this doesn't wait until the > application has finished. There is also a function called > CreateProces, but it look quite a bit more complicated, so if anyone > had allready implemented this function in MapBasic I'd love to know. > > Cheers, > Peter Horsb�ll M�ller > GIS Udvikler > Geographical Information & IT > > COWI A/S > Odensevej 95 > 5260 Odense S. > > Telefon 6311 4900 > Direkte 6311 4908 > Mobil 5156 1045 > Telefax 6311 4949 > E-mail [EMAIL PROTECTED] > http://www.cowi.dk > > > --------------------------------------------------------------------- > List hosting provided by Directions Magazine | www.directionsmag.com | > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > Message number: 11237 > --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 11318
