Scripting Safari's Preferences window
Scripting Safari's Preferences window
- Subject: Scripting Safari's Preferences window
- From: Irwin Poche <email@hidden>
- Date: Sun, 13 Jul 2003 11:05:53 -0500
This morning I was reading some newspaper articles online and found their
embedded, blinking, animated advertisements to be an annoying distraction.
Having had some luck with UI scripting and knowing that disabling plug-ins,
Java, and JavaScript within Safari would silence the little buggers I
decided to throw together a quickie UI script to do just that.
A few hours later, having had no success, I9m now realizing how difficult
that really is. The Window that Preferences opens can go by seven different
names: 3General2, 3Tabs2, 3Security2, etc. (and so could any other open
window). Nor can I go by window number. The window to be scripted could
have any window number since it may already be open. 3Front2 doesn't appear
to work either.
Even eliminating the 3what window2 issue, I still cannot figure out the
correct form of reference to use for the check boxes I want to click. If
the Security preferences window is open then this ought to work, but
doesn9t...
tell application "Safari" to activate
tell application "System Events"
tell process "Safari"
click check box "Enable Java" of window "Security"
click check box "Enable plug-ins" of window "Security"
click check box "Enable JavaScript" of window "Security"
end tell
end tell
Looking at the results of a 3get properties of UI elements...2 command is
not much help either. It looks like a Group may have to be referenced, but
I9m clueless on that.
Knowing how to click the Preferences window9s Security icon button would be
helpful also.
Any help is appreciated,
-Irwin
_______________________________________________
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.