Accessibility
Accessibility
- Subject: Accessibility
- From: Brian Christmas <email@hidden>
- Date: Thu, 06 Oct 2016 14:36:54 +1100
Mainly for Bill Cheeseman
G’day scripters
Some time ago, Bill wrote this as a way of reading the Accessability of a App.
However, under Sierra, this seems to always return a true. I think because the ability of Apps to trigger the command 'tell application “System Events’ to click “n” using command down’ seems to always be allowed. Could be wrong, but in my App, Bills routine never triggers.
tell application "System Events" to set GUIScriptingEnabled to UI elements enabled -- read-only in OS X 10.9 Mavericks and newer
I’m using
repeat tell application "TextEdit" activate try close every window saving no end try do shell script ("sleep 1") tell application "System Events" to tell process "TextEdit" try do shell script ("sleep 0.2") click menu item "Preferences…" of menu 1 of menu bar item "TextEdit" of menu bar 1 set my assistTrial to true exit repeat on error errmsg number errnum set my assistTrial to false exit repeat end try end tell end tell end repeat
Which seems to return consistent results, but is not as elegant as Bills routine.
Anyone got anything simpler, please?
Regards
Santa
And what, you ask, was the beginning of it all? And it is this...... Existence that multiplied itself For sheer delight of being And plunged with numberless trillions of forms So that it might find itself innumerably
Sri Aurobindo
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden