我有这个简单的Applescript,它会在新标签页中重新打开活动标签
tell application "Google Chrome"
tell first window
set theUrl to URL of active tab
set myTab to make new tab at end of tabs
set URL of myTab to theUrl
end tell
end tell
因此,我可以打开标签at end of tabs
或at beginning of tabs
,但如何在指定的标签索引处打开新标签页。我想在活动标签后将其作为下一个标签打开。
答案 0 :(得分:2)
您可以使用术语at after tab (number)
;像这样
tell application "Google Chrome"
tell first window
set n to active tab index
set theUrl to URL of active tab
set myTab to make new tab at after tab n with properties {URL:theUrl}
end tell
end tell