I found here an interesting example of Apple script commands such, for instance,
tell application "System Events" to get properties of every desktop
and I would like to understand, where these commands are documented. I found the explanation for the
tell command, and I understand that we have to use the "Systems Events" app for this task. I even discovered the "Script Editor" app and inside it, I opened the Dictionary for "System Events", and find plenty of definitions, which are likely methods we can invoke on the "System Events" object.
However, I did not find any explanation of the keywords
every in the above command. Using the Search field and entering "get" and "every" did not bring up anything useful. Perhaps they are some keywords with a predefined meaning.
I could type "desktop" in the search field, and find as explanation something like this (abbreviated):
desktop n : desktop picture settings elements contained by application. properties
name (text, r/o) : name of the desktop
id (integer, r/o) : unique identifier of the desktop ....
My guess is that 'desktop' is the instance of some object, which in turn is contained inside another object of class application, and that we can send it methods such as
id. However, I don't see any relationship to the
tell application command above, and how we could logically conclude from this Dictionary explanation that this command would magically show us information about the desktops.
My programming background is Ruby/Python/Perl/C++/zsh and a bit of Haskell and Java, and I thought I would be able to understand library references of other languages somehow, but this one is too much for me...
Any help appreciated!