• 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: (no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Frustrated novice wants to paste the clipboard
  • Next by Date: Re: (no subject)
  • Previous by thread: Re: (no subject)
  • Next by thread: Re: (no subject)
  • Index(es):
    • Date
    • Thread