简体   繁体   English

使用Applescript在演示文稿中运行指定幻灯片的幻灯片放映

[英]Using Applescript run powerpoint slide show of specified slide in the presentation

I want to run PowerPoint slide show for only a particular slide. 我想仅为特定幻灯片运行PowerPoint幻灯片放映。 After my research, I tried following but I did not get expected result. 在我的研究之后,我尝试了以下但是没有得到预期的结果。 Both of the scripts, starts slide show but from the first slide. 两个脚本都从第一张幻灯片开始幻灯片放映。

1) 1)

`tell application "Microsoft PowerPoint"
    activate
    open "/Users/sanjeev/pppp.ppt"
    set slideShowSettings to slide show settings of active presentation
    set starting slide of slideShowSettings to 4
    set ending slide of slideShowSettings to 4
    run slide show slideShowSettings
end tell`

2) 2)

`tell application "Microsoft PowerPoint"
    activate
    open "/Users/sanjeev/pppp.ppt"
    set slideShowSettings to slide show settings of active presentation
    run slide show slideShowSettings
    go to slide slide show view of slide show window 1 number 4
end tell`

The second script gives an error also: error "Microsoft PowerPoint got an error: slide show view of slide show window 1 doesn't understand the go to slide message." 第二个脚本也出错:错误“Microsoft PowerPoint出错:幻灯片放映窗口1的幻灯片放映视图不理解转到幻灯片消息。” number -1708 from slide show view of slide show window 1 幻灯片放映窗口1的幻灯片放映视图中的数字-1708

I saw a question Want Applescript to change a Keynote presentation to a particular slide But I think that works only for KeyNote. 我看到了一个问题, 希望Applescript将Keynote演示文稿更改为特定幻灯片但我认为这仅适用于KeyNote。

Can anyone help? 有人可以帮忙吗?

Thanks 谢谢

This seems to work. 这似乎有效。 It looks buggy to me. 它对我来说很麻烦。 When the script is run the screen goes black, then flashes the slide then goes black then finally displays the slide. 当脚本运行时,屏幕变黑,然后闪烁幻灯片然后变黑,最后显示幻灯片。 I don't know if this is due to the script or the implementation of Applescript/ppt from Microsoft. 我不知道这是由于脚本还是来自Microsoft的Applescript / ppt的实现。 I say the latter. 我说后者。

tell application "Microsoft PowerPoint"
    set temp to active presentation's slide show settings
    set temp's starting slide to 2
    set temp's ending slide to 2
    set temp's range type to slide show range
    set temp's advance mode to slide show advance manual advance
    run slide show temp
end tell

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM