tell application "DEVONagent"
set theTabs to tabs of browser 1
set theCnt to count of theTabs
if theCnt > 1 then
set theTab to current tab of browser 1
repeat with theIdx from 1 to theCnt
if (item theIdx of theTabs) is theTab then exit repeat
end repeat
set theIdx to theIdx + 1
if theIdx > theCnt then set theIdx to 1
set current tab of browser 1 to item theIdx of theTabs
end if
end tell
Thank you Christian! I knew it would have something to do with a loop to match the index of the current tabs to all the tab indexes… but I was too lazy to figure it out myself.