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: Sander Tekelenburg <email@hidden>
- Date: Sat, 3 Oct 2009 18:01:55 +0200
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.
--
Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>
_______________________________________________
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