How to open a new tab in Background in Chrome using AppleScript
How to open a new tab in Background using AppleScript in chrome. Open a tab seems so easy, but I just can't find what can be called to open the tab in background, which means the active tab remains开发者_开发百科 the same.
You can save the active tab index
in a variable and set it back after you created your tab:
tell application "Google Chrome"
set activeIndex to get active tab index of window 1
tell window 1
set newTab to make new tab with properties {URL:"http://www.google.com/"}
end tell
set active tab index of window 1 to activeIndex
end tell
精彩评论