如何使用AppleScript关闭MS Office Ribbon?
我正在使用AppleScript来驱动我正在用另一种语言为PowerPoint生成脚本做的一些测试。基本上,脚本所做的是重新加载一个特定的演示文稿,然后关闭除幻灯片窗格以外的所有窗格,这样我就可以获得我正在生成的幻灯片的最大、最详细的视图 我大部分时间都在那里,但不知道如何关闭窗口顶部的功能区 如何使用AppleScript获取对功能区的引用 这是我目前的脚本:如何使用AppleScript关闭MS Office Ribbon?,applescript,Applescript,我正在使用AppleScript来驱动我正在用另一种语言为PowerPoint生成脚本做的一些测试。基本上,脚本所做的是重新加载一个特定的演示文稿,然后关闭除幻灯片窗格以外的所有窗格,这样我就可以获得我正在生成的幻灯片的最大、最详细的视图 我大部分时间都在那里,但不知道如何关闭窗口顶部的功能区 如何使用AppleScript获取对功能区的引用 这是我目前的脚本: tell application "Microsoft PowerPoint" if the name of the acti
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