Re: Batch Program Processing via AppleScript
Re: Batch Program Processing via AppleScript
- Subject: Re: Batch Program Processing via AppleScript
- From: "Marc K. Myers" <email@hidden>
- Date: Mon, 03 Dec 2001 16:15:46 -0500
- Organization: [very little]
>
Date: Mon, 03 Dec 2001 11:30:16 -0500
>
From: "Dennis F. Kahlbaum" <email@hidden>
>
Reply-To: email@hidden
>
To: email@hidden
>
Subject: Batch Program Processing via AppleScript
>
>
I am a newbie to AppleScript, so this problem may be already solved.
>
However, I wasn't able to find anything in the archives.
>
>
I have a large number of Absoft Macintosh FORTRAN programs (call them A,
>
B, C, D, etc) that must be executed sequentially. The problem is: B must
>
only start executing after A is completely done, C must only start
>
executing after B is completely done, etc. How can this batch program
>
processing be done using AppleScript? (This is analogous to a simple
>
DOS BAT file.). When I tried, Programs A, B, C, D, etc, all began
>
running at the same time, instead of waiting appropriately.
Create a stay-open applet with an idle handler which returns every few
seconds to check what's going on. Set a flag and start up program A.
When it's found not to be running, set a flag and start up program B,
etc. You check if a program is running by asking the Finder for the
name of the processes. If your app name is in the list, it's running.
An alternative approach would be to get a copy of the Sleep Commands
scripting addition. It has commands that "sleep" a script while a
specified application is running and wakes it up when that app finishes.
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[12/3/01 4:14:28 PM]