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: Malcolm Fitzgerald <email@hidden>
- Date: Mon, 10 Mar 2003 10:12:25 +1100
Emmanuel was quoted as saying:
----------------------------
run script ("{<<class usrf>>:{\"a\", \"b\"}} as record")
--> {a:"b"}
----------------------------
John said
Note that you will have slight oddities if the names ("a" above) happen to
collide with known terminology words:
set a to run script ("{+class usrf;:{\"application\", \"beer\"}} as record")
{
|application|:"beer"
}
And, somewhat to my surprise, here's a case where app isn't expanded to
application but is recognized:
set a to run script ("{+class usrf;:{\"app\", \"beer\"}} as record")
{
|app|:"beer"
}
This phenomenon may or may not get in the way of the desired use of the
converted data.
I think I'd prefer to use one of the hash table solutions.
--John
--
John Baxter email@hidden Port Ludlow, WA, USA
Is beer an application?
Terminology conflicts will be the least of your problems. My computer
gets thirsty:
script s
property t : run script "{app:\"beer\"}" -- simple form
end script
tell application of s's t to open
--> beer does not understand the "open" message -- Yikes!
class of s's t's application
--> string
tell application (application of s's t) to open
-- computer tries to find beer
--> opens beer if successful
-- otherwise asks user for assistance
--> "Where is beer?" dialog box
p.s. If you are hooked up to one of those internet fridges you could
run this as a cron job.
--
--
Malcolm Fitzgerald email@hidden
Database Manager
http://www.asauthors.org
The Australian Society of Authors ph: 02 93180877 fax: 02 93180530
_______________________________________________
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.