Launch Google Chrome from the command line with specific window coordinates

后端 未结 5 661
悲&欢浪女
悲&欢浪女 2020-12-02 15:56

I\'m trying to find a shell command that will open Google Chrome with specific x and y coordinates (so that I can set the position of the window when it opens.) Is it possib

5条回答
  •  隐瞒了意图╮
    2020-12-02 16:23

    When you're using Google's Chrome, there is a shorter way:

    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" 
         --profile-directory="Default"
         --app="data:text/html,"
    

    Pro:

    • Automatically opens the window
    • Avoids the popup-blocker
    • Opens multiple windows on different monitors (multi monitor setup, requires two or more Chrome profiles)

    Con:

    • Only seems to work in "app" Mode
    • Not tested with other browsers

提交回复
热议问题