Michael Hall wrote:
>More or less curiosity. I'm not seeing any changes anywhere concerning this
>from 10.3. Which I think means it can only be done with the UI Scripting
>available with the accessibility options which are default off and require
>admin authority to turn on. Is this correct or am I missing documentation
>updates? I have verified accessibility does still seem default off...
As I recall, the accessibility option is still off by default. I enabled
it a long time ago on my machine, and haven't turned it off since.
It's controlled on the Universal Access pane of System Preferences,
represented by this checkbox at the bottom:
[ ] Enable access for assistive devices
Changing this in System Preferences still needs admin privileges, and it
will prompt you for it if you're not logged in as an admin.
>...
>But no further. Nothing concerning windows or UI elements works.
Correct. It won't work until you enable access for assistive devices.
Even UIELementInspector.app refuses to run until it's enabled.
Also, you have to direct UI-element verbs at a WINDOW of the target app,
not at the target app itself. From the archived posting you cited:
# List the windows
tell application "System Events"
get windows of process "xOneFrame"
end tell
# Properties of a window
tell application "System Events"
tell application process "xOneFrame"
get properties of window 1
end tell
end tell
# List all the UI elements of a window
tell application "System Events"
tell application process "xOneFrame"
tell window 1
get UI elements
end tell
end tell
end tell
Finally, I don't remember whether UI-elements targeting works on an AWT app
or whether it requires a Swing app. I vaguely recall that it doesn't work
with peered AWT components, and requires Swing JComponents, but I could be
mis-remembering.
I recommend the same strategy I did before:
Start simple and work up.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden