• 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
Picking data from a record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Picking data from a record


  • Subject: Picking data from a record
  • From: John Fountain <email@hidden>
  • Date: Fri, 24 Sep 2004 09:46:08 -0400

Hello List-

Below is a sample script to illustrate a problem I am having.

set testRecord to {H:"Height", W:"Width"}
set sampleData1 to {1, "H", 2}
set testThis to item 2 of sampleData1
set finalResult to (item testThis) in testRecord

I have a list of items. I want to pick one of the items from the list and if that item's contents corresponds to the name of one of the variables in a record I want a variable to be set with the contents of that variable in the record. Does that make sense? I can't seem to work around the error I get because the variable testThis is actually a string. I have tried to make it an item and so forth but I have run out of ideas.

My description probably isn't so great but hopefully the sample above will illustrate what I am trying to do. If the example makes sense then maybe someone can suggest a better way to accomplish the same thing without a giant, nested clump of if-then-else statements.

Thanks, All!

-john

 _______________________________________________
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: Picking data from a record
      • From: Joseph Weaks <email@hidden>
    • Re: Picking data from a record
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: GraphicConverter scripting help
  • Next by Date: Get HFS Path of POSIX Path?
  • Previous by thread: [ANN] New FooDoo
  • Next by thread: Re: Picking data from a record
  • Index(es):
    • Date
    • Thread