有谁知道我将如何实现以下目标?
我希望在幻灯片放映结束后制作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'"
thx:)
答案 0 :(得分:0)
您只需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"