• 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: Searching for the equivalent of coercing to type "record"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Searching for the equivalent of coercing to type "record"


  • Subject: Re: Searching for the equivalent of coercing to type "record"
  • From: Emmanuel <email@hidden>
  • Date: Fri, 7 Mar 2003 17:11:55 +0100

At 8:07 AM -0500 07/03/03, Steve Cunningham wrote:
I have a tab-seperated text file of the form:

"field_name_x" (tab) "field value" (tab) "field_name_y" (tab) "field
value" (return)
"field_name_x" (tab) "field value" (tab) "field_name_y" (tab) "field
value" (return)
... etc

I know the set of possible field names, but not which will appear in any
given record or in what sequence

What I'd like to end up with is an AppleScript record of the form:

{field_name_x: "field value",field_name_y: "field value"}

I think that you will be interested in the following snippet:

do script ("{<<class usrf>>:{\"a\", \"b\"}} as record")
--> {a:"b"}

(put chevrons where suitable)

Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Searching for the equivalent of coercing to type "record"
      • From: Paul Berkowitz <email@hidden>
References: 
 >Searching for the equivalent of coercing to type "record" (From: Steve Cunningham <email@hidden>)

  • Prev by Date: Re: Selection (was Re: Better Open Dictionary)
  • Next by Date: RE:Meeting Location
  • Previous by thread: Searching for the equivalent of coercing to type "record"
  • Next by thread: Re: Searching for the equivalent of coercing to type "record"
  • Index(es):
    • Date
    • Thread