Applescript 检测 Keynote 中显示的幻灯片
正如标题所说—— 有没有办法检测主题演讲中显示的幻灯片(使用 applescript)? 是的,我知道如何使用 applescript 更改幻灯片,我只需要检测哪张幻灯片已经处于活动状态。
解决了! >>>>>见下文
(没有足够的声誉来回答我自己的问题,所以我就将其放在这里。)
由于这个人的脚本,我找到了解决方法:http://code.google.com/p/keynotetweet/
对于 Keynote 中的每张幻灯片,您都可以选择附加不可见注释(不是黄色便签,它是底部的文本框将页面视图更改为“显示演示者注释”)。这里你可以存储一个触发字符串,即“action”。因此,创建一个主题演讲并将“行动”放在一张幻灯片的注释中。启动 applescript,然后启动幻灯片,当注释中带有“操作”的幻灯片可见时,applescript 将拾取它并执行您设置的任何操作。
repeat
tell application "Keynote"
set slideNotes to get notes of current slide of first slideshow
if text of slideNotes is equal to "action" then
say "Is this the slide you're looking for?"
end if
end tell
end repeat
享受!
As the title says-
Is there a way to detect what slide is showing in a keynote presentation (using applescript)?
And yes, I am aware of how to change slides with applescript, I just need to detect what slide is already active.
SOLVED! >>> SEE BELOW
(Don't have enough reputation to answer my own question, so I'll just stick it here.)
I found a way round it thanks to this guy's script: http://code.google.com/p/keynotetweet/
For each slide in Keynote you get the option to attach invisible notes (not the yellow stickies, its a text box at the bottom of the page. Change the view to "Show Presenter Notes"). Here you can store a trigger string, ie "action". So create a keynote and put "action" in the notes of one slide. Start up the applescript then the slideshow, and when the slide with "action" in the notes is visible, the applescript will pick up it up and do whatever you set it to do.
repeat
tell application "Keynote"
set slideNotes to get notes of current slide of first slideshow
if text of slideNotes is equal to "action" then
say "Is this the slide you're looking for?"
end if
end tell
end repeat
Enjoy!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
给你
应用程序“Keynote”的文档“Untitled”的幻灯片 3
gives you
slide 3 of document "Untitled" of application "Keynote"