Re: Resetting a repeat loop counter on the fly
Re: Resetting a repeat loop counter on the fly
- Subject: Re: Resetting a repeat loop counter on the fly
- From: "Arthur J. Knapp" <email@hidden>
- Date: Tue, 26 Nov 2002 13:32:55 -0500
>
Date: Tue, 26 Nov 2002 10:24:54 -0500
>
Subject: Resetting a repeat loop counter on the fly
>
From: "John C. Welch" <email@hidden>
>
Is there any way to change the value of a repeat loop counter within the
>
repeat loop?
No. Just create your own counter:
set i to 1
set n to 10
repeat
if ( resetting-test ) then
set i to 1
else if ( stopping-test ) then
exit repeat
else
-- do stuff
set i to i + 1 --> increment
end if
end repeat
Actually, we can simplify this:
set i to 1
set n to 10
repeat until i > n
if ( resetting-test ) then
set i to 1
else
-- do stuff
set i to i + 1 --> increment
end if
end repeat
{ Arthur J. Knapp, of <
http://www.STELLARViSIONs.com>
a r t h u r @ s t e l l a r v i s i o n s . c o m
}
_______________________________________________
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.