1

I can no longer open a URL in a specific tab using AppleScript. I tried the following code without success:

set URL of tab 1 to "https://"

and

set myLink to "https://"
tell application "Google Chrome"
    activate
    tell front window to make new tab 1 with properties {URL:myLink}
end tell

neither of which perform the desired action.

Question
What do I need to change in the code in order to be able to accomplish this task?

2

This works for me on the latest version of macOS Sierra

set myLink to "https://google.com/"

tell application "Google Chrome"
    tell its window 1
        set theTabs to count of tabs -- how mmany open tabs
        set URL of tab 1 to myLink -- insert desired tab
        --set URL of (make new tab) to myLink
    end tell
end tell

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .