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: Paul Skinner <email@hidden>
- Date: Fri, 7 Mar 2003 16:03:43 -0500
On Friday, March 7, 2003, at 03:26 PM, Steve Cunningham wrote:
----------------------------
run script ("{<<class usrf>>:{\"a\", \"b\"}} as record")
--> {a:"b"}
----------------------------
Emmanuel
Thanks! That's a new one on me. Took me a while to figure out Chevrons
weren't Greater Than and Less Than signs :-)
Sorry to be so clueless, but how am I supposed to get variables into
the
\"a\" and \"b\" slots from outside of the script? I tried globals, but
they didn't work.
I can't find out any information on this in the AppleScript Language
Guide or O'Reilly's. Could you point me to a better source?
Thanks
Steve
Prior to the run script construction, they're just text. So...
set tagName to "myTag"
set valuename to "3.1415"
run script ("{+class usrf;:{\"" & tagName & "\", \"" & valuename &
"\"}} as record")
--> {|myTag|:"3.1415"}
For reasons I don't care to waste cycles on; this returns the tag in
pipes if your tag contains mixed uppercase and lowercase text.
Paul Skinner
_______________________________________________
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.