演示结束后,make applescript关闭主题演讲


0

有谁知道我将如何实现以下目标?我想在幻灯片放映结束后制作Applecript close Keynote。任何想法?mybe通过关键字应用程序属性中的“播放”类?但我不知道怎么写它。我的代码到目前为止

tell application "Keynote" to open "/Users/bla/Desktop/bla1.key"
delay 3 set var to properties of application "Keynote"
repeat if var contains "playing:false" then
exit repeat
end if
delay 1
end repeat

do shell script "killall 'Keynote'" 

谢谢

Answers:


1

如果你运行它来启动主题演讲,那么它将在你停止演示(esc)时尽快退出Keynote(在5秒内)。如果您希望它在最后一张幻灯片上停留预设的时间后退出,那么就这样说。

tell application "Keynote"
    if not playing then
        start
        repeat while playing
            delay 5
        end repeat
    end if
    quit
end tell
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.