演示结束后,使applescript关闭注释记号

演示结束后,使applescript关闭注释记号,applescript,presentation,keynote,Applescript,Presentation,Keynote,有人知道我将如何实现以下目标吗 我想在幻灯片放映完成后制作applescript close注释记号。有什么想法吗? mybe是否通过keynotes应用程序属性中的类“播放”? 但是我不知道该怎么写 到目前为止我的代码 tell application "Keynote" to open "/Users/bla/Desktop/bla1.key" delay 3 set var to properties of application "Keynote" repeat if var conta

有人知道我将如何实现以下目标吗

我想在幻灯片放映完成后制作applescript close注释记号。有什么想法吗? mybe是否通过keynotes应用程序属性中的类“播放”? 但是我不知道该怎么写

到目前为止我的代码

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'"

thx:)

您只需告诉应用程序“Keynote”播放即可访问播放属性:

tell application "Keynote"
    open "/tmp/temp.key"
end tell
tell application "System Events" to tell process "Keynote"
    click button "Play" of tool bar 1 of window 1
end tell
tell application "Keynote"
    repeat while playing
        delay 1
        say "a"
    end repeat
end tell
say "b"

天哪,你真是个天才:)成功了。现在我只需要让这两个循环都进行:)thx
重复3次告诉应用程序“Keynote”打开/Users/bla/Desktop/1.key“end-tell-tell-application”Keynote“delay”3播放时重复delay 1 end-repeat-end-tell-application“Keynote”退出delay 1-tell-application“Keynote”打开/Users/bla/Desktop/2.key”结束告诉应用程序“注释记号”播放延迟时重复3次延迟1结束重复结束告诉应用程序“注释记号”退出延迟1结束重复