Applescript - Google Chrome activate a certain window

前端 未结 6 1541
梦毁少年i
梦毁少年i 2020-12-14 21:42

Do you guys know how to activate the n-th Google Chrome window with Applescript? For example, if I have three Google Chrome windows opened, how do activate the second?

6条回答
  •  感动是毒
    2020-12-14 22:11

    In addition to the solutions regarding activating the desired window, (at least) newer Chrome versions also support windows’ active tab index property:

    tell window 1
        set active tab index to 5
    end tell
    

提交回复
热议问题