Re: (no subject)
Re: (no subject)
- Subject: Re: (no subject)
- From: Bill White <email@hidden>
- Date: Thu, 20 Nov 2003 13:40:16 -0500
>
Okay, is there any way to make a repeat loop count backwards like the
>
following snippet does not:
>
>
set loop_list to {"a", "b", "c", "d"}
>
>
repeat with i from (count of loop_list) to 1
>
display dialog item i
>
end repeat
>
>
-->does nothing.
Bill,
Try this:
set loop_list to {"a", "b", "c", "d"}
repeat with i from (count of loop_list) to 1 by -1
display dialog item i of loop_list
end repeat
It's the -1 that counts backward, and you also need to "display dialog item
I of loop_list" to see the result.
HTH,
Bill
_______________________________________________
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.