Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: posix path argument




On 01/06/2006, at 01:28, Nir Soffer wrote:

On 31/05/2006, at 23:09, Nir Soffer wrote:


[how to handle posix path argument]


I found the solution:


set HFSPath to ((POSIX file posixPath) as Unicode text)


I found (thanks Gnarlodious) much nicer solution:


set aPath to "/foo/bar"
tell application "TextEdit"
open my POSIX file aPath
end tell


Anyone has a clue why you need "my" for "posix file"?


Also, the error you get if you leave out "my" is not very helpful.


Try this code with a path to exiting file:


set aPath to "/foo/bar"
tell application "TextEdit"
open POSIX file aPath
end tell

You get:

TextEdit got an error: Can't make POSIX file \"/foo/bar\" into type alias.


Instead of something about posix file.



Best Regards,


Nir Soffer


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.