Re: exit this repeat loop
Re: exit this repeat loop
- Subject: Re: exit this repeat loop
- From: Michelle Steiner <email@hidden>
- Date: Mon, 12 Sep 2005 09:36:59 -0700
On Sep 12, 2005, at 8:24 AM, Robert Poland wrote:
Is there a more elegant way to exit this repeat loop? Less than two
lines?
Looking for a way to exit a long "System Events" repeat loop in
case of a problem.
repeat with index from 1 to the 10
set optionDown to testOption() -- line 1
if optionDown then return -- line 2
beep
delay 1
end repeat
How about this:
repeat with index from 1 to the 10
if testOption() then return
beep
delay 1
end repeat
--
"You can fool some of the people all of the time and those are the
ones you want to concentrate on."
- George W. Bush at the Gridiron Dinner, Washington, DC March 31, 2001
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden