How to create a new Chrome window on Mac OS X using applescript or a shell script?

12,894

Solution 1

tell application "/Applications/Google Chrome.app"
    make new window
    activate
end tell

Solution 2

tell application "Google Chrome"
    make new window
    open location "your url"
end tell

this is what I have done to open facebook messenger to create a small application in a way for fb messenger

Share:
12,894

Related videos on Youtube

Michał Bendowski
Author by

Michał Bendowski

Updated on September 17, 2022

Comments

  • Michał Bendowski
    Michał Bendowski over 1 year

    I would like to be able to open a new Chrome window from LaunchBar, which means I have to express the action as an AppleScript or as a shell script / executable program. I tried automator, but it doesn't really work.

    So - is it possible? I tried using applescript but things like "make new window at front" don't work...

  • Michał Bendowski
    Michał Bendowski almost 13 years
    You can actually use just 'application "Google Chrome"'.
  • kipkoan
    kipkoan almost 13 years
    I had first used 'application "Google Chrome"', but that would activate the Parallels/Windows version of Google Chrome. Specifying the full path was the easiest solution of the ones I found.
  • seekingtheoptimal
    seekingtheoptimal almost 12 years
    Your answer always saves me everytime I reformat my Mac. =p Thanks again.
  • Burgi
    Burgi about 8 years
    This answer does not appear to add anything that the other answers haven't already said.