Re: String to multiple-item list coercion
Re: String to multiple-item list coercion
- Subject: Re: String to multiple-item list coercion
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 27 Sep 2002 20:07:03 -0700
On 9/27/02 7:46 PM, "Malcolm Fitzgerald" <email@hidden> wrote:
>
> For me, the oddest part of all this is that in this one context, only, you
>
> can get away with a normal English word , 'text', as the record label,
>
> instead of having to use the raw code <<class ktxt>>.
>
>
>
Can we now decide what the shortest/simplest/handiest one liner is?
>
I'll offer the obvious:
>
>
(the clipboard as record)'s text
Not quite, but close.
set myPath to path to me as Unicode text
(myPath as record)'s text
--> {[plain text]}
class of result
--> list -- [! a one-item list]
set myPath to path to me as Unicode text
item 1 of ((myPath as record)'s text)
--> [plain text]
That does it in one line. Might peculiar, but it does.
--
Paul Berkowitz
_______________________________________________
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.