Re: Mac OS X Finder Opening a file
Re: Mac OS X Finder Opening a file
- Subject: Re: Mac OS X Finder Opening a file
- From: Christopher Nebel <email@hidden>
- Date: Fri, 27 Apr 2001 12:28:41 -0700
On Friday, April 27, 2001, at 03:23 AM, Glenn Kowalski wrote:
Ok, either Mac OS X has some serious Applescript problems, or I'm
overlooking something. I can't even get the Finder to launch a file!
Tell application "Finder"
Open file filepath
End tell
This does nothing! I've tried changing the path to start with "/",
tried using slashes instead of ":", but nothing. Is scripting the
Finder totally broken?
For reasons we're still looking into, the Finder in Mac OS X 10.0
doesn't understand "file <path>" references. However, "alias"
references and long-hand Finder object specifiers both work fine. For
example:
tell application "Finder"
-- This doesn't work...
open file "Tukuul:Users:neb:Documents:drawer-bug.tiff"
-- ...but both of these do.
open alias "Tukuul:Users:neb:Documents:drawer-bug.tiff"
open file "drawer-bug.tiff" of folder "Documents" of folder "neb"
of folder "Users" of disk "Tukuul"
end tell
Finder scripting in Mac OS X is has its problems, but it's not *totally*
broken.
--Chris Nebel
AppleScript Engineering