• 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: Meeting a matrix of conditions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Meeting a matrix of conditions


  • Subject: Re: Meeting a matrix of conditions
  • From: Paul Robinson <email@hidden>
  • Date: Tue, 14 Sep 2004 20:20:57 +0100

There's this approach:

set _matrix to {¬
"apple", "orange", "banana", "mango", "tomato", ¬
"tomato", "apple", "apple", "tomato", "apple", ¬
"orange", "banana", "banana", "tomato", "mango", ¬
"mango", "tomato", "apple", "orange", "orange", ¬
"apple", "mango", "tomato", "banana", "orange"}
set x to (ASCII number (some item of {"a", "b", "c", "d", "e"})) - 97 --set x relative to zero
set y to (ASCII number (some item of {"v", "w", "x", "y", "z"})) - 117 --set y relative to 1
set z to item ((x * 5) + y) of _matrix --get nth item of the matrix


which is good where you have to sketch out, on a bit of paper, the matrix. Cos then you just copy it into the script. If you can 'zone' the matrix (i.e. collect like results together) even better.

P.

On 14 Sep 2004, at 06:40, Joseph Weaks wrote:

I figure there must be a more clever & efficient way to do this:


_______________________________________________ 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
  • Follow-Ups:
    • Re: Meeting a matrix of conditions
      • From: David Andrews <email@hidden>
References: 
 >Meeting a matrix of conditions (From: Joseph Weaks <email@hidden>)

  • Prev by Date: File Vault and File References
  • Next by Date: Re: String to list conversion
  • Previous by thread: Re: Meeting a matrix of conditions
  • Next by thread: Re: Meeting a matrix of conditions
  • Index(es):
    • Date
    • Thread