首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >AppleEvent处理程序失败(-10000)

AppleEvent处理程序失败(-10000)
EN

Stack Overflow用户
提问于 2015-08-11 20:57:11
回答 1查看 4.2K关注 0票数 5

我对脚本的一个简单部分有问题,我想获得系统事件的属性dock preferences。我有以下几点:

代码语言:javascript
运行
复制
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的异常呢?

干杯

EN

回答 1

Stack Overflow用户

发布于 2015-08-12 02:59:45

这?

代码语言:javascript
运行
复制
tell application "System Events" to get properties of dock preferences
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31951784

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档