0

有谁知道我将如何实现以下目标?

我想让applescript在幻灯片结束后关闭Keynote。任何想法?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'"

谢谢 :)

4

1 回答 1

0

您可以通过以下方式访问 play 属性tell app "Keynote" to playing

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"
于 2013-05-22T15:00:14.330 回答