• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Batch Program Processing via AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Batch Program Processing via AppleScript


  • Subject: Re: Batch Program Processing via AppleScript
  • From: JJ <email@hidden>
  • Date: Mon, 03 Dec 2001 23:34:58 +0100

> 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.
>
> Thanks in Advance.

The simplest way, let the Finder check if the app is running.

-- NOT TESTED

set PROGRAM_A to alias "HD:Applications:A"
set PROGRAM_B to alias "HD:Applications:B"
set PROGRAM_C to alias "HD:Applications:C"

tell app "Finder"
open PROGRAM_A
delay 3 -- wait while launching
repeat
set CurrentApps to name of processes
if "A" is not in contents of CurrentApps then exit repeat
end repeat
open PROGRAM_B
delay 3 -- wait while launching
repeat
set CurrentApps to name of processes
if "B" is not in contents of CurrentApps then exit repeat
end repeat
open PROGRAM_C
end tell

JJ


  • Prev by Date: Re: Error type -1753 Sometimes... Please Help
  • Next by Date: Re: Back to Dynamic Records (Was: Re: interesting discovery (trying to get record labels as strings))
  • Previous by thread: Re: Batch Program Processing via AppleScript
  • Next by thread: Character sets, applescript, and the web [almost ASCII]
  • Index(es):
    • Date
    • Thread