3

I am trying to create a shortcut for XLaunchpad and WinLaunch so that I can get a "new tab" (which contains the shortcuts to apps, etc.) to appear. Not about:blank or a URL.

However when I use

chrome chrome://newtab

It keeps on opening a new window.

It is sort of the inverse of How can you configure Chrome to open new browser instances in new windows rather than in a tab?

1
  • Thanks for the comments below. I've edited your question to make it clearer for others to respond to. Please look at the changes to make sure I got it correct.
    – Isxek
    Aug 15, 2012 at 5:31

2 Answers 2

4

http://

Just a blank http:// opens a new tab in chrome. This is the StackExchange syntax but its not displaying as a hyperlink:

[http://](http://)

5
  • Or, in relation to the actual question, use chrome http://somewebsite.com instead of the chrome:// prefix.
    – Isxek
    Aug 14, 2012 at 10:32
  • 1
    This still opens up the "new tab" in a new window. So this is not correct. Aug 14, 2012 at 15:15
  • @lsxek I am trying to get the "new tab" (which has the apps etc) showing up. Aug 14, 2012 at 15:16
  • actually a blank http:// on the omnibar also redirects to a google search for "http://" so this answer is just wrong. Aug 14, 2012 at 15:18
  • There's a related question on the Chrome forums, but it hasn't been answered yet. Looking at the available CL switches for Chrome, it looks like this ability is not available yet.
    – Isxek
    Aug 15, 2012 at 7:01
1

For me, running something like

start chrome https://google.com

opens a page in a new tab, but running

start chrome http://

(as suggested by the other answer) opens a new window. Perhaps it worked in the past?

As an ugly workaround, I save the following script as newtab.bat, and run the script from my shortcut key instead of running chrome directly:

@if (@CodeSection == @Batch) @then
@echo off

SET SendKeys=CScript //nologo //E:JScript "%~F0"
SET KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe"
FOR /F "tokens=2* delims=    " %%A IN ('REG QUERY %KEY_NAME% /ve') DO SET Chrome=%%B

"%Chrome%" https://google.com
%SendKeys% "^t^+{TAB}^w"

goto :EOF
@end

// JScript section

var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));

Explanation:

  1. Get the chrome executable path from the Windows registry

  2. Run chrome, opening https://google.com in a new tab (brings chrome into focus)

  3. SendKeys Ctrl+t

    This is the shortcut for opening a new tab.

  4. SendKeys Ctrl+Shift+Tab

    This shortcut switches back one tab (to google, which we just opened).

  5. SendKeys Ctrl+w

    This shortcut closes the current tab (the google tab).

(Did I mention it was an ugly workaround?)

The result is the chrome://newtab page opened in an existing chrome window (or a new window if none were open on the current desktop). I tried a lot of other variations of command line arguments and shortcuts, but I just couldn't find a better way from outside of chrome to open the new tab page in an existing window.

The SendKeys parts are modified from this answer.

You must log in to answer this question.

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