Re: AppleScript to open a file using the NSObject method - (BOOL)application: openFile:
Re: AppleScript to open a file using the NSObject method - (BOOL)application: openFile:
- Subject: Re: AppleScript to open a file using the NSObject method - (BOOL)application: openFile:
- From: Charles Srstka <email@hidden>
- Date: Thu, 9 Dec 2004 23:59:50 -0600
On Dec 9, 2004, at 10:43 AM, daniel wrote:
But as soon as you compile the script in Script Editor, it will
replace it with an HFS-style path.
Yeah, why does it do this, anyway? It's really annoying when you want
to make a script that will work on more than one machine. Sometimes you
just want to deal with /tmp or /Applications or whatever, and don't
care what the name of the boot disk is.
But anyway, here's a way to work around it:
set posixPath to "/Users/stephenmcintosh/Pictures/100_0590.JPG"
set theFile to POSIX file thePosixPath
tell application "Finder"
open theFile
end tell
Charles
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden