You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Applescript error "System Events got an error: Script Editor is not allowed assistive access."

I made this script to pooling the "Citrix Viewer" application and avoid be disconnected by time-out.


set appName to "Citrix Viewer"

repeat while application appName is running
	tell application appName to activate
	tell application "System Events"
		click at {1, 1}
	end tell
	delay 300
end repeat


It works well in "Catalina" but now in "Big Sur" this error appears:


error "System Events got an error: Script Editor is not allowed assistive access." number -25211


I already added and granted access for Script Editor (and even System Events) for "Accessibility Access" in System Preferences > Security & Privacy tab for both Accessibility and Automation services.


Any ideas or advice?

MacBook Pro (2020 and later)

Posted on Oct 12, 2021 1:01 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 12, 2021 1:59 PM

Thanks for your quick response. I only got this:



I already added Script Editor to the System Preferences > Security & Privacy > Privacy > Accessibility panel but the problem persist.

3 replies

Oct 12, 2021 3:12 PM in response to Eduardo Rodriguez_Avila

Well, just for the record, while the error remains a mystery, I was able to get work my script changing the click instruction by another. The code now is as follows:


set appName to "Citrix Viewer"

repeat while application appName is running
	tell application appName to activate
	tell application "System Events"
		keystroke tab using option down
	end tell
	delay 300
end repeat

Applescript error "System Events got an error: Script Editor is not allowed assistive access."

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.