I have problems with the simple part of the script where I want to get the dock preferences property of system events. I have the following:
tell application "System Events" tell appearance preferences set ap_prefs to (get the properties) set ap_prefs to the properties end tell set a_pref to the properties of appearance preferences
In the code above, I refer to appearance preferences in all the ways shown above, but not dock preferences . This gives the error error "System Events got an error: AppleEvent handler failed." number -10000 error "System Events got an error: AppleEvent handler failed." number -10000 .
So what is happening, and why is there only an error with the docking station? Here @dj_bazzie_wazzie says:
Error -10000 ... most of the time this is not a goal error, but an incomplete command or incorrect use of brackets.
But I can not understand what is right. I tried everything I could think of, and why doesn't it throw an exception for appearance preferences ?
Greetings
source share