我正在使用这个AppleScript循环浏览Safari中的选项卡以获得"仪表板"在工作中:
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"
为什么会发生这种情况,我该如何解决?
提前致谢!
答案 0 :(得分:1)
It's a bug.
Solution:
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