Re: OS X 10.1 Finder & "path to"
Re: OS X 10.1 Finder & "path to"
- Subject: Re: OS X 10.1 Finder & "path to"
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 03 Oct 2001 19:45:35 -0700
On 10/3/01 7:19 PM, "Peter Boctor" <email@hidden> wrote:
>
The following outside of a tell block works correctly.
>
path to startup disk
>
--> alias "Mac OS X:"
>
>
But inside of a Finder tell block it errors out:
>
>
tell application "Finder"
>
path to startup disk
>
end tell
>
--> Finder got an error: Can't make startup disk into a item.
>
>
Is it just me?
>
The 'path to' osax has never functioned well in the Finder and you shouldn't
use it that way. But the Finder has its own 'startup disk' , 'desktop',
'trash' keywords (application properties). And now 'home' in OS 10.1. Just
use them if you're in the Finder:
tell application "Finder"
startup disk as alias
end tell
or
tell application "Finder"
(startup disk as alias) as string
end tell
The other 'special folders' are gone, and you can now use 'path to' with
them.
tell application "Finder"
path to scripting additions from user domain
end tell
--
Paul Berkowitz