• 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: Kai <email@hidden>
  • Date: Sat, 08 Mar 2003 07:45:19 +0000

Several contributors wrote:

> "{<<class usrf>>:{\"" & ... & "\"}} as record"

The explicit coercion to record doesn't seem to be really required here:

=======================================

to makeRecords from t
repeat with d in {{tab, "\", \""}, {return, "\"}}, {<<class usrf>>:{\""}}
set text item delimiters to d's item 1
set {t, text item delimiters} to {t's text items, d's item 2}
set {t, text item delimiters} to {t as string, {""}}
end repeat
run script "{{<<class usrf>>:{\"" & t & "\"}}}"
end makeRecords

makeRecords from "field_x X1 field_y Y1
field_x X2 field_y Y2"

--> {{field_x:"X1", field_y:"Y1"}, {field_x:"X2", field_y:"Y2"}}

=======================================

--
Kai
_______________________________________________
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.

  • Prev by Date: "info for" weirdness
  • Next by Date: Re: Simple request
  • Previous by thread: Re: 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