• 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: working with records
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: working with records


  • Subject: Re: working with records
  • From: Stan Cleveland <email@hidden>
  • Date: Tue, 21 Aug 2007 13:02:12 -0700
  • Thread-topic: working with records

On 8/21/07 4:51 AM, Wayne Melrose wrote:

> I have a record with different values..
> eg
> set rec to {username:"wayne", emailadd:"email@hidden"}
>
> now I can get ..
>                     set username to username of rec
>                     set emailadd to emailadd of rec
>
> that's fine.. but with many items in the record, what I'd like to do
> is extract (or expand) all of the items at the same time.. with their
> label coming the variable name.. is this even possible?
>
> result would be..
>                     set username to "wayne"
>                     set emailadd to "email@hidden"
>
> Thanks for any help.

How about this?

set rec to {username:"wayne", emailadd:"email@hidden", blah:7}
set {username, emailadd, blah} to {username, emailadd, blah} of rec
username --> "wayne"
emailadd --> "email@hidden"
blah --> 7

Stan C.


 _______________________________________________
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/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: working with records
      • From: Wayne Melrose <email@hidden>
References: 
 >working with records (From: Wayne Melrose <email@hidden>)

  • Prev by Date: Re: FTP and Applescript
  • Next by Date: Re: FTP and Applescript
  • Previous by thread: working with records
  • Next by thread: Re: working with records
  • Index(es):
    • Date
    • Thread