Re: timeout options
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