在 SenseTalk 中记录对象的所有属性的最简单方法是什么?
像这个C# 示例,但用于茄子脚本?
从某种意义上说,谈话对象被表示为 propertyLists。您可以使用与使用 propertyList 完全相同的语法来迭代对象的键。
set mike to {current:["Mike and the Mechanics","Genesis"],previous:"Red 7"}
repeat with each item of keys(mike)
put it & ": " & property (it) of mike
end repeat
// current: [Mike and the Mechanics,Genesis]
// previous: Red 7