Re: extracting info from list returned by info for
Re: extracting info from list returned by info for
- Subject: Re: extracting info from list returned by info for
- From: Israel Chauca Fuentes <email@hidden>
- Date: Sat, 3 Oct 2009 11:53:26 -0500
On Oct 3, 2009, at 11:01 AM, Sander Tekelenburg wrote:
At 22:14 -0500 UTC, on 2009-10-02, Israel Chauca Fuentes wrote:
[...]
tell application "Finder"
set theInfo to info for myFile
end tell
Please do not advise Newbies to use tell blocks where they are
inappropriate.
It's probably the single most common trap people fall into.
This is the only right way:
set theInfo to info for myFile
set MARI to folder of theInfo
or, as one liner:
set MARI to folder of (info for myFile)
The rule is very simple: do not tell the Finder, or any other
target, unless
you *need* to.
I had no idea it could be done without involving the Finder, thanks
for the info.
Cheers,
Israel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden