Re: How can we pass unix file paths to the finder?
Re: How can we pass unix file paths to the finder?
- Subject: Re: How can we pass unix file paths to the finder?
- From: Timothy Bates <email@hidden>
- Date: Fri, 28 Sep 2001 12:20:58 +1000
On 28/9/01 8:46 AM, "Shane Stanley" <email@hidden> wrote:
>
On 28/9/01 1:35 AM +1000, Timothy Bates, email@hidden, wrote:
>
> Is there a way to say to the finder
>
> tell application "Finder"
>
> open folder "~/Desktop Folder"
>
> end tell
>
What's wrong with:
>
tell application "Finder"
>
open (path to desktop folder from user domain)
>
end tell
OK. I had no idea about the "from user domain" modifier. That would be
useful to have in the new OSA menu navigation scripts.
Still, that only works for special folders, so it is no use to me in 99% of
scripts.
Or just think mac and say
>
tell application "Finder"
>
open folder "Desktop" of (path to current user folder)
>
end tell
Ahh, nor did I have a clue about path to current user folder. That gets us
there.
There should, however, be a little utility function in the standard
additions to turn unix paths into mac paths.
Open ("~/Applications" as mac path)
Tim