• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: extracting info from list returned by info for
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: extracting info from list returned by info for
      • From: Israel Chauca Fuentes <email@hidden>
References: 
 >extracting info from list returned by info for (From: Mari Masuda <email@hidden>)
 >Re: extracting info from list returned by info for (From: Israel Chauca Fuentes <email@hidden>)

  • Prev by Date: Re: can't set bounds in Adobe Acrobat Pro
  • Next by Date: Re: extracting info from list returned by info for
  • Previous by thread: Re: extracting info from list returned by info for
  • Next by thread: Re: extracting info from list returned by info for
  • Index(es):
    • Date
    • Thread