Re: Avoiding A System Events Password
Re: Avoiding A System Events Password
- Subject: Re: Avoiding A System Events Password
- From: "Stockly, Ed" <email@hidden>
- Date: Thu, 13 May 2010 12:08:52 -0500
- Acceptlanguage: en-US
- Thread-topic: Avoiding A System Events Password
Title: Re: Avoiding A System Events Password
This is what I use, It doesn’t require a password, but does require user interaction, which may be what you’re trying to avoid.
Good luck!
TurnOnUIElements()
on TurnOnUIElements()
repeat 3 times
tell application "System Events"
if UI elements enabled then
tell application "System Preferences" to quit
return
else
repeat 3 times
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\"" giving up after 30
end tell
if UI elements enabled then
tell application "System Preferences" to quit
exit repeat
end if
end repeat
end if
end tell
delay 2
end repeat
end TurnOnUIElements
On 5/13/10 9:53 AM, "Luther Fuller" <email@hidden> wrote:
I've been working on a script to convert an emlx file to a pdf file. It uses "CUPS-PDF" which I installed earlier this week. It works, but there's one little problem. The script requires that "Enable access for assistive devices" is checked. Here's the script ...
tell application "System Events"
set UIStatus to UI elements enabled
set UI elements enabled to true
end tell
-- do lots of stuff here, including a couple of lines of UI scripting
tell application "System Events" to set UI elements enabled to UIStatus
The user can change "Enable access for assistive devices" manually via the Universal Access pref pane without entering a password. And, if it's already checked, the script above works perfectly.
If it's NOT checked, the problem appears.
System Events always asks for a user password
when changing UI elements enabled .
There is no reason for System Events to require a password, since the user can make the change manually without one. This is very annoying!
Does anyone know a way around this problem?
_______________________________________________
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