• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript to open a file using the NSObject method - (BOOL)application: openFile:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: daniel <email@hidden>
  • Date: Thu, 9 Dec 2004 08:43:36 -0800

Also, from the scripting side, if you want to use a posix path, you can do so by saying:

open posix file "/Users/stephenmcintosh/Pictures/100_0590.JPG"

But as soon as you compile the script in Script Editor, it will replace it with an HFS-style path.

Daniel

On Dec 7, 2004, at 10:26 AM, M. Uli Kusterer wrote:

At 20:37 Uhr +1100 07.12.2004, Stephen J McIntosh wrote:
I have the following script which is sent to my test application
tell application "ImageBuddy"
	open file "/Users/stephenmcintosh/Pictures/100_0590.JPG"
end tell

That's wrong. AppleScript takes old-style HFS paths. Since HFS-to-Unix-path conversion happens by swapping colons and slashes (mostly), this explains why you seem to be getting an HFS path. You're not, you're just passing in a file name containing slashes, instead of a pathname...
-- Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com


This email sent to email@hidden

_______________________________________________ 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
  • Follow-Ups:
    • Re: AppleScript to open a file using the NSObject method - (BOOL)application: openFile:
      • From: Charles Srstka <email@hidden>
References: 
 >AppleScript to open a file using the NSObject method - (BOOL)application: openFile: (From: Stephen J McIntosh <email@hidden>)
 >Re: AppleScript to open a file using the NSObject method - (BOOL)application: openFile: (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: Zooming images in NSView
  • Next by Date: Re: Protocol implementation split between base and derived class
  • Previous by thread: Re: AppleScript to open a file using the NSObject method - (BOOL)application: openFile:
  • Next by thread: Re: AppleScript to open a file using the NSObject method - (BOOL)application: openFile:
  • Index(es):
    • Date
    • Thread