Re: quoted form of POSIX path (was: .. digest, Vol 3 #1900
Re: quoted form of POSIX path (was: .. digest, Vol 3 #1900
- Subject: Re: quoted form of POSIX path (was: .. digest, Vol 3 #1900
- From: John Delacour <email@hidden>
- Date: Tue, 5 Aug 2003 00:01:27 +0100
At 6:25 pm -0400 4/8/03, Jonathan Levi, M.D. wrote:
Apparently (I didn't know about this form, either.) All of the
following work for me:
tell application "Finder" to get quoted form of POSIX path of ((disk
"LaC 39000") as string)
tell application "Finder" to get quoted form of ((disk "LaC 39000") as string)
get quoted form of "a string"
get quoted form of (("a string") as Unicode text)
'as string' is a very bad idea in OS X. The Finder and the shell talk Unicode.
You may get a list of trues when you run this script, but that's only
because you've selected a file with a 'convertible' name. As soon as
you select a file with any other character in it, you'll get one or
two falses.
tell application "Finder"
set f to item 1 of (get selection)
set a to quoted form of POSIX path of (f as Unicode text)
set b to quoted form of POSIX path of (f as file specification)
set c to quoted form of POSIX path of (f as alias)
set d to quoted form of POSIX path of (f as string)
{a = b, a = c, a = d}
--> {true, true, false}
end tell
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.