【问题标题】:How to randomize Keynote slides如何随机化 Keynote 幻灯片
【发布时间】:2012-05-04 15:01:54
【问题描述】:

我是一名教师,想将 Keynote 幻灯片用作拼写的抽认卡。我无法编写脚本,正在寻找要复制/粘贴到 Applescript 编辑器中并从那里运行的内容。我在另一个线程中遇到了以下脚本,它接近我需要的。

tell application "Keynote"
    tell slideshow 1
        show slide 3
        show slide 2
        show slide 1
        show slide 4
    end tell
end tell

但是,我的目的有两个问题: 1. 这不是一个随机的顺序,写出几个不同长度的不同演示文稿会很乏味。 2.每张卡片显示的时间长度没有控制。

任何建议将不胜感激。

【问题讨论】:

    标签: keynote


    【解决方案1】:

    这是一个混合索引并在每张幻灯片之间等待的脚本

    set tdelay to 5 -- seconds  -- the length of  time each card is shown.
    
    tell application "Keynote"
        activate
        tell slideshow 1 to repeat with i in my mixIndexes(count slides)
            show slide i
            delay tdelay
        end repeat
    end tell
    
    on mixIndexes(n)
        set l to {1}
        if n is 1 then return l
        repeat with i from 2 to n
            set end of l to i
            set j to some item of l
            tell item i of l to set {item i of l, item j of l} to {item j of l, it}
        end repeat
        return l
    end mixIndexes
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-08-24
      • 2023-01-31
      • 1970-01-01
      • 2016-11-20
      • 2021-01-18
      • 2016-05-04
      • 1970-01-01
      相关资源
      最近更新 更多