延迟使用AppleScript而不是延迟循环

时间:2012-11-29 19:53:39

标签: applescript delay

我有以下AppleScript,由于某种原因,它不会延迟指定的时间。我理解它的方式,它应该在每次显示之间延迟10秒,但我在对话后得到对话而没有任何延迟

我已经尝试了几种不同的变体,但它们都是相同的

set models to {"tom", "dick", "harry", "mark", "ringo", "john"}
set users to {"359597388", "338954297", "339380024", "1254012084", "265934082", "105804369"}
repeat
    repeat with model in models
        repeat with user in users
            delay (6000)
            display dialog "Sending user:" & user & "With model:" & model & "."

        end repeat

    end repeat
end repeat

1 个答案:

答案 0 :(得分:0)

尝试:

set models to {"tom", "dick", "harry", "mark", "ringo", "john"}
set users to {"359597388", "338954297", "339380024", "1254012084", "265934082", "105804369"}
repeat
    repeat with model in models
        repeat with user in users
            delay 10
            display dialog "Sending user:" & user & " With model: " & model & "."
        end repeat

    end repeat
end repeat