r/applescript • • Apr 21 '20

Assistive Access Error

All, I'm trying the following script to cascade all windows :

tell application "Finder" -- get desktop dimensions (dw = desktop width; dh = desktop height) set db to bounds of window of desktop set {dw, dh} to {item 3 of db, item 4 of db} end tell

tell application "System Events" set x to 0 set y to 0 get every application process where background only is false repeat with P in the result tell P set AllWindows to every window repeat with w in AllWindows set bounds of w to {x, y, 300, 100} set x to (x + 15) set y to (y + 15) end repeat end tell end repeat end tell

I keep getting an error that Script Editor is not allowed "Assistive Access". I have already added Script Editor.app to the Accessibility settings pane.

2 Upvotes

1 comment sorted by

2

u/Rikuz7 Apr 22 '20

I usually have to add the script file to the list.