Simon,
Some time ago I hade the same request and
a friendly person (I think it was Bo Thomsen) on MapInfo-L supplied me with
a Delphi DLL, that could do the trick.
The trick is to use a Windows API function
that can wait for the called application to finish, before returning to the
caller.
Let me know if you are interested and I'll
send you the snippet that was given to me. As it contains files, I can't send
them thru MapInfo-L
Peter Horsbøll Møller
GIS Developer, MTM
Geographical Information & IT
COWI A/S
Odensevej 95
5260 Odense S.
Denmark
Tel + 45 6311 4900
Dir +45 6311 4908
Mob +45 5156 1045
Fax + 45 6311 4949
E-mail [EMAIL PROTECTED]
From: [EMAIL PROTECTED] on behalf of Terry McDonnell
Sent: Fri 17-Mar-06 12:08
To: Simon Allen; [EMAIL PROTECTED]
Subject: RE: [MI-L] Run Application
Simon
Not sure that the 1st will have finished before the 2nd
begins? Don't know myself.
The first
could set like a semaphore flag, in a table, and the second could wait for this
flag to have been set before running. e.g.
Dim
llGoAhead as logical
llGoAhead =
FALSE
Run
application "App1" ' When this app finishes it sets flag
SemaTable.LSEMFLAG
Do while not
llGoAhead
Select LSEMFLAG from SemaTable into
csrTemp
llGoAhead = csrTemp.LSEMFLAG
Loop
Run
application "App2"
This might
not be necessary if the apps run discretely but HTH
Terry
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Simon Allen
Sent: 17 March 2006 10:46
To: Terry McDonnell
Subject: [MI-L] Run Application
Hi
I have a script
which issues two Run Application commands.
How can I ensure
that the first application has finished running before issuing the second
command?
Ta
Simon
Allen
Senior GIS Officer
South Gloucestershire
Council
01454 863655 (direct)
01454 863855 (fax)
_______________________________________________ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l