• 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
Sort a list of lists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sort a list of lists


  • Subject: Sort a list of lists
  • From: CYB <email@hidden>
  • Date: Thu, 16 Nov 2006 15:36:57 -0600
  • Thread-topic: Sort a list of lists

Title: Sort a list of lists
Hi everyone,

I have a variable number of objects in a page – for example 4 rectangles- and I need to know which one is the left-top most, (I’m scripting InDesign CS2) so I get the geometric bounds of all this objects and I get a list of lists
My typical list looks like
{{5.0, 120.0, 40.0, 169.0}, {10.0, 10.0, 50.0, 59.0}, {70.0, 20.0, 110.0, 69.0}, {70.0, 80.0, 110.0, 128.0}}
So basically I need to compare the first 2 items (y, x) of every list in that main list, in this example the order (Left/Right, clock wise) is
1.- second list, 2.- first list, 3.- third list, 4.- fourth list

I think, at the first moment that it’s pretty simple, but for my disgrace I found that after many hours of try to write an algorithm to to this, I have nothing, :-((

Anyone have something in this way or can someone point me in the right direction?
Your help will be appreciated.

--
Carlos Ysunza
Director
SoftRobot Automated Workflows
http://www.softrobot.com.mx
email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Sort a list of lists
      • From: Michelle Steiner <email@hidden>
    • Re: Sort a list of lists
      • From: "Steven D. Majewski" <email@hidden>
    • Re: Sort a list of lists
      • From: Andrew Oliver <email@hidden>
    • Re: Sort a list of lists
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Odd Finder Behavior
  • Next by Date: Re: Sort a list of lists
  • Previous by thread: RE: Odd Finder Behavior
  • Next by thread: Re: Sort a list of lists
  • Index(es):
    • Date
    • Thread