I think the answer to this question is yes. Using a German environment your suggestion likely corresponds to Systemeinstellungen... > Bedienungshilfen > 'Zugriff für Hilfsgeräte aktivieren'
But even though I have activated this option, I still observe the same error. Nevertheless, I learn that applescript is the direction to go. It would be really neat to get this running.
Cheers
JJ
System Preferences > Universal Access 'Enable access for assistive devices' = true
I had the same error. By changing that System Preference item every Applescript (also be used in R > Console > Execute Line) is working well.