• 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: Halting a Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Halting a Script


  • Subject: Re: Halting a Script
  • From: Nigel Smith <email@hidden>
  • Date: Wed, 25 Jun 2003 14:59:01 +0100

On 25/6/03 11:42, "HomeLink USA" <email@hidden> wrote:

> OS9
> That doesn't do it. I get the beep and the script continues. Here's a sample
> portion:

This works in OS9 -- providing no other app gets in the way with a "can't
quit" or a dialog of some kind. Note that the script itself would get in the
way, since it will wait for the Finder to return something from the
"restart" command, but the Finder can't restart until the script has quit.
The "ignoring application responses" block gets round this by telling the
script *not* to wait for a response from the Finder, but to just carry on.

----------
tell application "Finder"
set AppsUp to ((the name of every application process) as string)
if AppsUp does not contain "SomeApp" then
ignoring application responses
tell application "Finder"
restart
end tell
end ignoring
return
end if
end tell
tell application "SomeOtherApp"
--Do this stuff
end tell
----------

HTH,

Nigel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Halting a Script (From: HomeLink USA <email@hidden>)

  • Prev by Date: Re: What is the most recordable application in OS X? (and other questions)
  • Next by Date: Re: Recipients in Mail.app
  • Previous by thread: Re: Halting a Script
  • Next by thread: Re: Oh-oh, another victim to scripting Mail [SOLVED!]
  • Index(es):
    • Date
    • Thread