Re: Scripting Safari's Preferences window
Re: Scripting Safari's Preferences window
- Subject: Re: Scripting Safari's Preferences window
- From: Andrew Oliver <email@hidden>
- Date: Sun, 13 Jul 2003 12:18:10 -0700
(Irwin, I hope you don9t mind me posting my reply to the list, too)
You9re right in that it adds to the costs of developing an application.
However, it sets a dangerous precedent.
Right now I rate AppleScript support in OS X applications in general as
mediocre to poor (there are exceptions, but generally, it9s not very good).
With AppleScript GUI going mainstream, I fully expect this to degrade to
being poor to none.
My rationale for this is that we get mediocre AppleScript support now when
it does cost time/money. If the developer perceives there is a no-cost
option, he9ll eliminate AppleScript support altogether. This will lead to an
overall decrease in software functionality.
I bet that 99 out of 100 developers who save time by eliminating AppleScript
support will use that time to push their product out the door sooner. Not
one minute of that time saving will go into improving the functionality, UI
or performance of their application.
So I think poor is the best we can expect. If we remove the obligation for
the developer to implement AppleScript support we lose. Not just us as
AppleScript mavens, but users in general because without AppleScript you are
tightly bound by the limited vision of the developer. There are numerous
examples of where robust AppleScript support has taken applications into
realms their developers never envisioned, all because of ingenuity on the
part of users.
AppleScript frees us from the narrow-minded tunnel vision of developers.
It IS a major USP of the Mac OS, but one that Apple, themselves, seem to
largely ignore (Apple9s apps have some of the weakest dictionaries around)
AppleScript GUI is little more than a macro program, and does little more
than QuicKeys has done for years, but with a much more verbose syntax and
more limited functionality in certain areas.
Take the recent discussion that started this rant... A simple request to
toggle JavaScript on/off in Safari.
What should be one line of AppleScript (as I posted in my earlier response)
turns into 24 lines of AppleScript (25 if you include the additional line to
close the preferences window which Barbara omitted). That is a phenomenal
waste of both the scripter9s and execution time - and that script makes
little or no sense to a novice. Hell, even I had a hard time working out
what she was trying to do and I9ve used AppleScript for years (no offense to
you, Barbara - you did it about the only way it9s currently possible).
How much time do you think it would take for the Safari developers to add
JavaScript enabled9 as an application property in the dictionary? Clearly
it already exists in the app, they just need to give access to it via
AppleScript.
The learning curve for AppleScript (and AppleScript GUI, too) is too high,
and I think that9s the other problem with it - not enough people are using
it because its inconsistencies make it too hard to learn. Unfortunately I
think Apple reads this as lack of demand for AppleScript rather than a lack
of understanding of AppleScript.
Apple need to define standards for AppleScript support in Cocoa so that all
applications support a rich core of Apple Events (and I mean *rich*), and it
needs to make it easier for developers to add hooks into other parts of
their code. This will only come from the top down and Apple need to set an
example. The example they are currently setting scares me.
Andrew
:)
On 7/13/03 10:53 AM, "Irwin Poche" <email@hidden> wrote:
>
I agree with your desire to have robust AS capabilities. The bottom line
is
>
that it adds time (hence cost) to development effort. Since I doubt that
AS
>
adds much to the sales of most products it will usually be a 3maybe later2
>
feature. UI is better than nothing.
>
>
For example, who better than Apple can deliver AS capabilities? But they
>
don9t always give us what we9d like. There is still no native way to hide
the
>
OS X Finder. But if I add a couple of hack and UI scripting, a function
key
>
can quit the Finder, which is just as good as hiding it.
>
>
-Irwin
>
>
>
On 7/13/03 12:18 PM, Andrew Oliver said:
>
>
> On 7/13/03 10:02 AM, "Irwin Poche" <email@hidden> wrote:
>
>
>
>> > But it appears that it can only function when Safari is not running, or
at
>
>> > least it does not change the settings in real time.
>
>
>
> That is true :-/
>
>
>
>> > That is why I9m looking to a UI solution. We may wait a very, very
long
>
>> time
>
>> > for any application to become fully scriptable. UI scripting will give
us
>
>> an
>
>> > high degree of scriptability, with no work (I think) on the part of the
>
>> > application9s developers.
>
>
>
> <rant>
>
> And therein lies the problem. If people are content with the GUI scripting
>
> hack, it's used as an excuse to not put robust AppleScript dictionaries
into
>
> applications.
>
>
>
> In this particular instance, I can almost hear the engineers saying "Oh,
>
> users can use GUI scripting to turn on/off JavaScript', so there's no need
>
> for me to make a 'javascript' property of my app so they can:
>
>
>
> tell application "Safari" to set JavaScript enabled to true
>
>
>
> Which would you rather have?
>
> Which is the likeliest scenario?
>
>
>
> GUI Scripting has its uses but it should ALWAYS be accompanied by a
>
> complaint/feature request/bug report to the developer saying "I had to
>
> resort to GUI Scripting to achieve <xyz task>. Can you please add direct
>
> AppleScript access to this feature."
>
>
>
> I have yet to see one GUI scripting-based script that could not be done
>
> quicker and easier if the target applications had robust AppleScript
>
> support.
>
>
>
> </rant>
>
> 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.
_______________________________________________
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.