0

在 SenseTalk 中记录对象的所有属性的最简单方法是什么?

像这个C# 示例,但用于茄子脚本?

4

1 回答 1

2

从某种意义上说,谈话对象被表示为 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
于 2020-11-03T16:31:53.177 回答