我正在向我的 macOS 应用程序添加 AppleScript 支持,但在访问我定义的对象的属性时遇到问题。
sdef 文件生成以下目录:
当我运行以下脚本时:
tell application "Daily"
get all activities
end tell
我得到这个结果:
但是,当我运行此脚本时:
tell application "Daily"
repeat with iActivity in (get all activities)
name of iActivity
end repeat
end tell
我收到此错误:
error "Daily got an error: Can’t make «class » id \"E10E6A7B-6D3B-464B-9C31-35DB6763C492\" into type specifier." number -1700 from «class » id "E10E6A7B-6D3B-464B-9C31-35DB6763C492" to specifier
知道我做错了什么吗?谢谢!