How to open a new tab in Background in Chrome using AppleScript How to open a new tab in Background in Chrome using AppleScript google-chrome google-chrome

How to open a new tab in Background in Chrome using AppleScript


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 activeIndexend tell