Re: Searching for the equivalent of coercing to type "record"
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.