Macos AppleEvent处理程序失败(-10000)
我在脚本的一个简单部分遇到了问题,我想获取系统事件的属性Macos AppleEvent处理程序失败(-10000),macos,applescript,Macos,Applescript,我在脚本的一个简单部分遇到了问题,我想获取系统事件的属性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
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
在上面的代码中,我以上面显示的所有方式访问外观首选项
,但不访问停靠首选项
。它给出一个错误“系统事件得到一个错误:AppleeEvent处理程序失败。”编号-10000
那么到底发生了什么,为什么只给出dock的错误呢@dj_bazzie_wazzie说:
错误-10000…大多数情况下,这不是目标错误,而是命令不完整或括号使用错误
但我不知道什么是正确的方法。我已经尝试了我能想到的一切,为什么它不为外观首选项抛出异常呢
干杯这是什么
tell application "System Events" to get properties of dock preferences
适用于OMM(10.10.4)。您使用的是什么操作系统(旧版本上可能有问题)?你对你的码头应用过任何非标准设置/自定义吗?@foo我也在10.10.4上。我不记得对我的码头做过什么。我也没有任何第三方的应用程序可以控制码头。我想SE会出问题的。即使在最好的时候,情况也非常糟糕。(孩子们,不要在家里设计这样的软件!)你可以试着分别获取dock preferences
对象的每个属性,看看它们中的一个或所有属性是否失败,然后在上面(如果我是你,我不会屏住呼吸等待结果)@foo我也会猜到同样的错误,但是当我在脚本调试器中运行命令时会抛出同样的错误,这是AppleScript的另一个IDE。s/SE/System Events/g代码>