【发布时间】:2014-02-27 23:09:52
【问题描述】:
我正在尝试编写一个将使用 PowerPoint 的 Save as Pictures... 函数的 AppleScript,但我正在与 AppleScript 搏斗。这就是我所拥有的:
set p to "file.pptx"
tell application "Microsoft PowerPoint"
launch
open p
delay 2
click menu item "Save as Pictures..." of menu bar item "File" of menu bar 1
end tell
它没有做我想要的。我得到的具体错误是:
script error: Expected end of line, etc. but found class name. (-2741)
我不知道该怎么办。我已经尝试了各种各样的东西,但我似乎无法点击正确的菜单项。我正在使用 OSX 10.9 和 PowerPoint 2011(版本 14.3.2)
更新:
这是我现在拥有的脚本:
set p to "file.pptx"
tell application "Microsoft PowerPoint"
launch
open p
end tell
delay 2
tell application "System Events"
tell process "PowerPoint"
click menu item "Save as Pictures..." of menu 1 of menu bar item "File" of menu bar 1
end tell
end tell
我收到了execution error: Microsoft PowerPoint got an error: Parameter error. (-50)
【问题讨论】:
-
好主意,但事实证明这是不正确的。不过感谢您的帮助!
标签: macos applescript powerpoint osx-mavericks