• 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: timeout options
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: timeout options


  • Subject: Re: timeout options
  • From: Emmett Gray <email@hidden>
  • Date: Sun, 25 Feb 2001 20:42:24 -0500

On Sun, 25 Feb 2001 11:35:53 -0800, Brad Giesbrecht <email@hidden> wrote:

with timeout of 300 seconds
display dialog "message" buttons {Cancel, Close Windows, Continue}
end timeout

How can I keep the dialog up for a longer time without
the script timing out. I could just use a larger timeout
number, but I think I would like it to be indefinite.

Is there a timeout never, infinite or something like it?

Yes:

set done to false
repeat while (not done)
try
display dialog "message" buttons {Cancel, Close Windows, Continue}
set done to true
on error
end try
end repeat

This repeat loop does not rob processor time because it's only active when the dialog times out. When that happens the timeout error is trapped and the loop reiterates. I forget who showed me this trick a couple of years ago, thanks again to whomever.

Best,

--Emmett


  • Prev by Date: Quitting File Sharing Extension
  • Next by Date: Re: Applet's last command doesn't take
  • Previous by thread: Quitting File Sharing Extension
  • Next by thread: Window above Akua drawing
  • Index(es):
    • Date
    • Thread