Re: understanding dictionaries
Re: understanding dictionaries
- Subject: Re: understanding dictionaries
- From: Andrew Oliver <email@hidden>
- Date: Fri, 23 May 2003 22:15:23 -0700
Unfortunately, although scripting your preferences seems like the most
natural place to start AppleScripting, the System Preferences app just
doesn't provide sufficient AppleScript support to make it viable.
In short, the System Preferences app doesn't let you do much more than open
the System preferences app itself and get a list of the preference panes
installed.
There is no direct support for actually changing any of the options on the
panes. This may partly be because of the plug-in nature of preference panes
The only way you can do this is using GUI Scripting to emulate selecting the
Display preferences from the menu and clicking buttons, dragging sliders,
etc. IMHO GUI scripting is a poor hack and should be used as a last resort
not as an introduction to AppleScript - it will teach you bad habits that
will be hard to shake later.
Try starting out with another app that has decent scripting support. Right
now that means almost anything that's not Apple-branded.
Andrew
:)
On 5/23/03 9:25 PM, "Monee C. Kidd" <email@hidden> wrote:
>
OK, maybe I'm just not getting this language. I'm reading through the
>
Language Guide and I'm understanding the syntax of how the various
>
examples are put together. But what I'm still missing is how to make
>
this knowledge more general. When I look in the dictionaries for
>
various applications, I have no idea how to construct a sentence that
>
will do what I want it to do. For example, right now, I want to write
>
a script that will open the Displays panel in System Preferences and
>
reset the monitor brightness to full. I wrote a "script" in what I
>
thought was English language syntax, but Applescript recognizes none
>
of it.
>
>
So I have two questions. First, more specifically, how do I write
>
this specific script for System Preferences? And secondly, can
>
someone point me to some where I can learn to understand the way the
>
dictionaries are set up, so when I read something like:
>
>
Class pane: a preference pane
>
Plural form:
>
panes
>
Properties:
>
<Inheritance> item [r/o] -- All of the properties of the superclass.
>
name Unicode text [r/o] -- locale independent name of the
>
preference pane; can refer to a pane using the expression: pane
>
"<name>"
>
localized name Unicode text [r/o] -- localized name of the
>
preference pane
>
>
>
in the dictionary, I know what the heck that means and how I'm
>
supposed to use it? The little blurb about dictionaries in the
>
language guide doesn't explain it at all.
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.