applescript - 如何使用 AppleScript 关闭 MS Office Ribbon

我正在使用 AppleScript 来驱动我正在为另一种语言的 PowerPoint 生成脚本所做的一些测试。基本上脚本所做的是重新加载特定的演示文稿,然后关闭除幻灯片 Pane 之外的所有 Pane ,这样我就可以获得正在生成的幻灯片的最大、最详细的 View 。

我已经完成大部分内容了,但不知道如何关闭窗口顶部的功能区。

如何使用 AppleScript 获取对功能区的引用?

到目前为止,这是我的脚本:

tell application "Microsoft PowerPoint"
    if the name of the active window is "foobar.pptx" then
        close the active window
    end if
    open "foobar.pptx"

    set the bounds of the active window to {-1920, 22, 0, 1200}
    set the split horizontal of the active window to 0
    set the split vertical of the active window to 100
end tell

最佳答案

尝试:

activate application "Microsoft PowerPoint"
tell application "System Events"
    tell process "Microsoft PowerPoint"
        keystroke "r" using {command down, option down}
    end tell
end tell

关于applescript - 如何使用 AppleScript 关闭 MS Office Ribbon?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23257979/

相关文章:

ruby-on-rails - 在 current_password 字段中设计更改验证消息

datomic - 将任意键/值条目与数据实体一起存储

clojure - 是否可以检索定义变量的条件图?

azure - WAStorageEmulator.exe 启动失败

asp.net - 在 RDLC 报告 asp.net 中放置超链接

maven - java.lang.IllegalStateException : Could no

angularjs - 关于Angular $q defer对象的问题

shell - 将所有第二层 mp3 递归转换为第三层并更新 ID3

scala - 修复更高种类类型的类型推断

dart - 如何在 Dart 中产生一个新的隔离?