Re: System Events not working
Re: System Events not working
- Subject: Re: System Events not working
- From: Andrew Oliver <email@hidden>
- Date: Mon, 07 Apr 2003 14:08:17 -0700
On 4/7/03 1:26 PM, "John Delacour" <email@hidden> wrote:
>
At 12:11 pm -0700 7/4/03, Andrew Oliver wrote:
>
>
> What's wrong with:
>
>
>
> tell application "Finder" to set collapsed of window 1 to true
>
>
Who said there was anything wrong with it? The man was asking about
>
UI scripting.
Yes, he was, but there was a more direct solution to his problem.
Who was it who once said "give a man what he needs, not what he thinks he
needs?" :)
>
>
> <rant>IMHO GUI Scripting is creating a whole new suite of AppleScript
>
> problems...
>
>
It also provides a useful suite of actions under one roof that
>
previously required a variety of esoteric scripting additions.
>
Whereas before I needed Saendi's additions' TypeText, I can now write
>
'keystroke "j" with command down' whether I'm a Mongolian or an
>
Ancient Greek. Don't knock it too much -- it has its uses.
As much as I may knock GUI Scripting (and yes, I admit I do :) ), I do so
because I'm concerned for what it may become.
Firstly, many (especially new) scripters come to AppleScript and perceive
GUI Scripting commands as "the way" to do things. The problem here is that
a) let's face it, GUI Scripting syntax isn't all that clear, making
AppleScript look harder than it might be, and b) they're seeing a very, very
small proportion of what AppleScript really is, relegating it to the level
of macro languages.
The second, and to my mind more worrying problem is that it could promote
laziness/complacency in programmers and developers who, instead of
implementing feature-rich (or even feature-complete!) AppleScript
dictionaries, settle for the fact that 'the user can get there by emulating
this click/drag/type/keypress', thereby depriving the entire community of
the kind of powerful features and tools that Apple themselves use to extol
the virtues of the Mac OS, and further relegating AppleScript to the realm
of macro programs (see point 1 above).
If you doubt my fears here, just look through this list's archives for the
number of people who have asked about how to adjust various basic System
Preferences - adjust screen brightness, change network settings, sleep
settings, change monitor depths/resolutions, etc., etc., all of which would
be unnecessary if System Preferences.app had a decent dictionary (and
preference panes had a standard AppleEvent interface, of course, as would be
necessary with any plug-in, extensible application)
I fear Apple are seeing GUI scripting as the future of AppleScript rather
than working on the Cocoa libraries and making it easier for developers to
AppleScript-empower their apps.
Andrew
:)
_______________________________________________
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.