• 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 21:03:02 +0200

At 19:53 +0200 UTC, on 2009-10-03, Yvan KOENIG wrote:

> Le 3 oct. 2009 à 18:53, Israel Chauca Fuentes a écrit :
>
>>> 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.

That suggests that you might not be aware of AppleScript dictionaries:
<http://macscripter.net/viewtopic.php?id=24777>

There is AppleScript -- the language -- as defined in the AppleScript
Language Guide. Then there are individual applications, each providing a
"dictionary" in which you can read what exactly that app supports -- what you
can use in its tell blocks. And then there are Scripting Additions (aka
"osaxen"), which are a sort of plug-ins that extend the AppleScript Laguage.
(Not exactly the perfect description, but good enough in this case, IMO ;))
They too disclose their capabilities through "dictionaries".

You can read those dictionaries by dropping the (application) file in
question on the Script Editor icon, or by using Script Editor's File->Open
Dictionary... You can also drop apps (and Scripting Additions) onto Script
Editor's Library window, for quick reference.

I fully understand that most Newbie AppleScripters do not start to learn AS
by reading those dictionaries. I sure as hell didn't myself :) Intially it is
more fun to learn from examples. But it *is* good to at least know right from
the start that these dictionaries are the definitive source, so that, when in
doubt, or when merely curious, you can take a peek there. (And it probably
helps to know in advace that when you don't understand a dictionary, you are
not alone. They are often not that well written. I guess the only thing that
might change that is to submit bugreports to the responsible developers.)

Hence:

> Info for is a component of Standard Additions, not a Finder's one.

Which can be seen by looking at the Standard Additions' dictionary. (If it's
not listed in Script Editor's Library window by default, drag it in there,
from /System/Library/ScriptingAdditions/)

> In old operating systems, it was already 'bad practice' to include such
>instruction in a Finder block but it didn't hurt.
>
> Now with Snow Leopard, if I understand well the technote, it may hurt.

Yup. And, IMO at least, that's a good hurt :) Pain exists to let you know
that something needs fixing. Up until Snow Leopard, AppleScript would try to
hide this pain -- more, or less succesfully, depending on the phase of the
moon and other factors. That probably seems user-friendly, but it is at least
just as user-unfriendly :)


--
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>)
 >Re: extracting info from list returned by info for (From: Sander Tekelenburg <email@hidden>)
 >Re: extracting info from list returned by info for (From: Israel Chauca Fuentes <email@hidden>)
 >Re: extracting info from list returned by info for (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: extracting info from list returned by info for
  • Next by Date: Assigning keywords to a file without the use of Photoshop
  • 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