UI Element Scripts???

Has anyone had any troubles with the example scripts that reside in the “Example Scripts” folder for SE 2.0?

Applications/Applescript/Example Scripts/UI Element Scripts

I get this error on my G4 450MHzX2 and my G3 500MHz iBook…

Applescript Error
System Events got an error:
NSReceiverEvaluationScriptError: 4

SE 2.0 highlights this line in the “Get User Name.applescript” example.

click menu item "Sound" of menu "View" of menu bar 1

The “Key Down-Up.applescript” example works with out a hitch tho…

Go to System Preferences > Universal Access

Turn on “Enable access for assistive devices”

Does that help?

In the barrage of new email and such on all the lists about all this slicker-than-snot-on-a-doorknob AS stuff, I think I read a message from someone at Apple that there’s a setting you have to enable to make UI scripting work.

System Preferences → Universal Access
“Enable access for assistive devices”

That should do the trick, Greg. If it doesn’t, post again so I’ll know we need to dig deeper to play with our new toys!

Thanks Rob & T.J., that solved the problem. Now the example scripts are working perfectly. :smiley: