Re: Question about "info for" command
Re: Question about "info for" command
- Subject: Re: Question about "info for" command
- From: JJ <email@hidden>
- Date: Thu, 14 Jun 2001 18:49:01 +0200
>
Something about the "info for" command I don't understand.
>
>
One item is selected in the Finder.
>
>
tell application "Finder"
>
set x to folder of (info for selection)
>
end tell
>
>
--> returns an error message??
>
>
The Finder is understanding
"folder" > "folder which contains"
So, you can't obtain "folder" of "get info"
Try this with a selected-folder at your desktop:
tell application "Finder"
set theitem to item 1 of the selection
-- set theitem to the selection as alias
folder of theitem
end tell
--> desktop of application "Finder"
And this:
tell application "Finder"
set theitem to item 1 of the selection
class of theitem
end tell
--> folder
And, finish:
tell application "Finder"
set theitem to item 1 of the selection
set theinfo to (info for theitem) as list
item 7 of theinfo
end tell
--> true
JJ