Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

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 Best reply

Posted on Oct 12, 2021 1:08 PM

You need to add Script Editor to the System Preferences > Security & Privacy > Privacy > Accessibility panel:



You should have received a dialog with "Script Editor not allowed assistive access with an allow or cancel/deny button. Had you selected Allow, the above entry would have been done for you.

3 replies
Question marked as Best reply

Oct 12, 2021 1:08 PM in response to Eduardo Rodriguez_Avila

You need to add Script Editor to the System Preferences > Security & Privacy > Privacy > Accessibility panel:



You should have received a dialog with "Script Editor not allowed assistive access with an allow or cancel/deny button. Had you selected Allow, the above entry would have been done for you.

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 ID.