Alias vs. Finder object (was: Accented Characters in Finder Names)
Alias vs. Finder object (was: Accented Characters in Finder Names)
- Subject: Alias vs. Finder object (was: Accented Characters in Finder Names)
- From: Michelle Steiner <email@hidden>
- Date: Fri, 19 Dec 2003 10:33:08 -0700
On Dec 19, 2003, at 4:38 AM, Mr Tea wrote:
set itm to alias "Studio!:Studio Files:Test Zone:Store:Chbteau 2.jpg"
set N to name of (info for itm)
I tried it like this:
tell application "Finder"
set foo to item 1 of (the selection as list)
end tell
set n to name of (info for foo) as string
The log showed this:
tell application "Finder"
get selection
{folder "Chbteau" of folder "Desktop" of folder "michelle" of folder
"Users" of startup disk}
info for folder "Chbteau" of folder "Desktop" of folder "michelle" of
folder "Users" of startup disk
"Finder got an error: File folder Chbteau wasn't found."
However, when I used this:
tell application "Finder"
get selection
{folder "Chbteau" of folder "Desktop" of folder "michelle" of folder
"Users" of startup disk}
info for folder "Chbteau" of folder "Desktop" of folder "michelle" of
folder "Users" of startup disk
"Finder got an error: File folder Chbteau wasn't found."
The script worked.
It appears that info for does not like Finder objects, but only works
with aliases. Is this expected behavior because info for is not a
Finder command? BTW, putting the "info for" line inside the
tell-Finder block didn't help.
-- Michelle
--
You can not change the world without perforce changing yourself.
_______________________________________________
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.