|
|
#1 |
|
Prospect
Join Date: Feb 2003
Posts: 31
|
Dictionary shortcomings
Hi,
Other than reading a book and memorizing everything, is there a good reliable resource to find applescript words that don't have dictionary entries? For example, say I wanted to know, "What are the ways I can refer to a specific window?" I would search for the word "window", but would not find what I'm looking for. Unless I know one or two of the words already or have the intuition to look up the window property "index", I'd never find documentation like I found here on macosxautomation.com: Referring to a Finder WindowI can't seem to find a reliable way of finding words like "front", "middle", "back", "last", "before", "after", "first", "second", etc. unless I already know one or two of them. I mean, I suppose I could google around and find a couple words and then perhaps stumble upon something like the link above, but is there some resource that I could search using the word "window" and it would come back with all the adjectives I can use to specify a window? There's got to be something out there! Thanks, Rob |
|
|
|
|
|
#2 |
|
Major Leaguer
Join Date: Apr 2005
Posts: 477
|
I don't think there's a resource for what you're asking. You basically want a thesaurus for applescript terms... but I can't think of any. But you have a pretty good resource right at your fingertips. Open AppleScript Editor and look under the help menu. You'll find the applescript language guide and that will answer many of your questions. For example, I opened it as a PDF file so it's searchable. I searched for "last" and it showed me table 1-1 which is a list of all keywords... including those mentioned in your post.
|
|
|
|
|
|
#3 |
|
Prospect
Join Date: Feb 2003
Posts: 31
|
Thanks Regulus,
That is quite handy, though it took some digging to find the PDF, so for anyone else who happens along this post, here it is: AppleScriptLanguageGuide.pdf It's not exactly what I was hoping for, but is worlds better than only using the dictionary when you're a novice like me. Incidentally, it looks like the word I should have been searching for is "specifier". The nice list I posted earlier is a list of object "specifiers" and (from reading in the docs just a few minutes, I learned) it works on a lot more than just windows. And the table you pointed out is a list of "reserved words" - very handy! In my opinion, every reserved word should be in the dictionary. It's unthinkable to me that they are not. Is there a good reference book I can buy that has everything? Rob |
|
|
|
|
|
#4 | |||||||||||||||||||||||
|
Major Leaguer
Join Date: Apr 2005
Posts: 477
|
What dictionary are you referring to? The language guide is the "dictionary" for the applescript language. The other place to learn applescript commands is the dictionary for the "standard additions osax". The StandardAdditions are additions Apple has made to the base applescript language. In general the applescript language is made like this... you have commands that come from the base language, from the standard additions, and from each individual application. So for the base language you need the language guide. For the standard additions and for the individual applications you open their individual dictionary... under the File menu of AppleScript Editor you choose "open dictionary". From the list you can choose the StandardAdditions.osax or any application that is scriptable. So you see, there is no one place for all commands. The beauty of applescript is that any application developer can make their application apple-scriptable. They define how applescript works with their application and they define the command names. This is why each application has their own dictionary. The advantage of this approach is it makes applescript extensible by anyone. The down-side is it makes learning the language a little difficult because commands and terminology can get mixed up when so many people make it. |
|||||||||||||||||||||||
|
|
|
|
|
#5 |
|
Prospect
Join Date: Feb 2003
Posts: 31
|
Yeah
Yeah. Don't get me wrong. I'm all for AppleScript. I would just like to find comprehensive, lookup-oriented documentation with cross-references.
Rob |
|
|
|
|
|
#6 |
|
Major Leaguer
Join Date: Apr 2010
Posts: 324
|
I love and thoroughly recommend tha "AppleScript" books by Hanaan Rosenthal. Not quite what you're looking for, and not in the format you're requesting, but very helpful in figuring out specifiers and how they can be used.
__________________
see a problem; solve a problem. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|