tell application "Microsoft PowerPoint"
set sel to shape range of selection of active window
count of sel's shapes -- returns 2 for specific case
-- class of sel's shapes -- throws a compilation error "object you are trying to access does not exist"
set i to item 1 of sel's shapes -- i not set but this line does not throw an error
i -- error: the variable i is not defined
end tell
注释指示运行特定行时发生的情况。有趣的是,
sel's shapes
确实有计数,但我无法从中提取任何项目。我的第一直觉是
塞尔的形状
必须是其他数据类型,但
class sel's shapes
还抛出一个错误,抱怨
塞尔的形状
问:这里发生了什么?怎么可能
count of
定义(和工作!),同时
item 1 of
class of
不是吗?