【发布时间】:2021-02-09 06:23:48
【问题描述】:
在 SenseTalk 中记录对象的所有属性最简单的方法是什么?
喜欢这个C# example,但用于茄子脚本?
【问题讨论】:
标签: eggplant
在 SenseTalk 中记录对象的所有属性最简单的方法是什么?
喜欢这个C# example,但用于茄子脚本?
【问题讨论】:
标签: eggplant
有意义的谈话objects are represented as propertyLists。您可以使用精确的 same syntax as you would with a 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
【讨论】: