我对脚本的一个简单部分有问题,我想获得系统事件的属性dock preferences
。我有以下几点:
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
在上面的代码中,我以上述所有方式访问appearance preferences
,但不访问dock preferences
。它给出了一个错误error "System Events got an error: AppleEvent handler failed." number -10000
。
那么,到底是怎么回事,为什么只给了dock错误呢?Here @dj_bazzie_wazzie说:
误差-10000…大多数情况下,这不是一个目标错误,而是一个不完整的命令或错误的使用括号。
但我想不出正确的方法是什么。我已经尽力了,为什么它不抛出appearance preferences
的异常呢?
干杯
发布于 2015-08-12 02:59:45
这?
tell application "System Events" to get properties of dock preferences
https://stackoverflow.com/questions/31951784
复制相似问题