Re: working with records
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