Failed to process AppleEvent handler (-10000)

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 -- Error Part tell dock preferences set d_prefs to (get the properties) end tell set d_pref to the properties of dock preferences end tell 

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

+4
source share
1 answer

It?

 tell application "System Events" to get properties of dock preferences 
0
source

All Articles