AppleScript 怪异

AppleScript weirdness

我正在使用此 AppleScript 在 Safari 中的选项卡中循环以进行 "dashboard" 工作:

tell application "Safari"
repeat
    repeat with i from (count of tabs of window 1) to 1 by -1
        set thisTab to tab i of window 1
        set current tab of window 1 to thisTab
        delay 10
    end repeat
end repeat
end tell

我遇到的问题是,当我将 Safari 设置为全屏时,出现此错误:

error "The variable thisTab is not defined." number -2753 from "thisTab"

为什么会发生这种情况,我该如何解决?

提前致谢!

这是一个错误。

解决方案:

tell application "Safari"
    repeat
        repeat with i from (count of tabs of window 1) to 1 by -1
            tell window 1 to set current tab to tab i
            delay 10
        end repeat
    end repeat
end tell