Re: How to convert Finder reference?
Re: How to convert Finder reference?
- Subject: Re: How to convert Finder reference?
- From: "John W. Baxter" <email@hidden>
- Date: Thu, 11 Dec 2003 17:46:15 -0800
- Envelope-to: email@hidden
On 12/11/2003 14:25, "Michelle Steiner" <email@hidden> wrote:
>
On Dec 11, 2003, at 2:52 PM, Mark Dawson wrote:
>
>
> I want to convert a Finder reference to a string
>
> (duplicate x; set z to the result as string)
>
>
This works for me:
>
>
tell application "Finder"
>
set x to item 1 of (the selection as list)
>
duplicate x
>
set z to the result as string
>
end tell
>
>
-- Michelle
This pattern worked long ago, and seems to continue working in Panther
10.3.1 (watch line wrap...there is one line within the tell block):
tell application "Finder"
get (document file "2003Winter.pdf" of desktop of application "Finder")
as string
end tell
-->"Blake:Users:john:Desktop:2003Winter.pdf"
For extra credit, change "as string" to "as alias" and examine the result.
--John
PS...that's the Washington State Ferries winter schedule.
_______________________________________________
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.