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

发布于 2024-12-20 15:32:25 字数 1074 浏览 3 评论 0原文

我只想为特定幻灯片运行 PowerPoint 幻灯片放映。 经过我的研究,我尝试遵循,但没有得到预期的结果。 两个脚本都从第一张幻灯片开始幻灯片放映。

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)

`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`

第二个脚本也给出了一个错误: 错误“Microsoft PowerPoint 出现错误:幻灯片放映窗口 1 的幻灯片放映视图无法理解转到幻灯片消息。”幻灯片放映窗口 1 的幻灯片放映视图中的数字 -1708

我看到一个问题 希望 Applescript 将 Keynote 演示文稿更改为特定幻灯片 但我认为这只适用于 KeyNote。

有人可以帮忙吗?

谢谢

I want to run PowerPoint slide show for only a particular slide.
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)

`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)

`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." number -1708 from slide show view of slide show window 1

I saw a question Want Applescript to change a Keynote presentation to a particular slide
But I think that works only for KeyNote.

Can anyone help?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烙印 2024-12-27 15:32:25

这似乎有效。对我来说它看起来很麻烦。运行脚本时,屏幕变黑,然后闪烁幻灯片,然后变黑,最后显示幻灯片。我不知道这是由于脚本还是微软Applescript/ppt的实现造成的。我说的是后者。

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

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. 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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文