Chrome on startup to continue where I left off and another page

Whenever I open chrome I want:

  • All my previous pages are

  • Another page with custom url. (With the option to set it as chrome://newtab

    .)

Is it possible?

Is there a way that on open specific set of pages

, I can add the previous pages?

I tried looking. The closest I could find is this . This is not exactly what I wanted.

I would like to do it simply and simply. (I don't mind extensions, but I couldn't find them.)

I want this to be done without any input from me every time. So no Ctrl Shift T.

Thanks in advance.

+3


source to share


3 answers


If you need to automate the Chrome GUI you can use pywinauto. A student of mine wrote an example of dragging and dropping a file from explorer.exe to Google Drive open in Chrome. Some tricks are used here.

test_explorer_google_drive.py

  • Chrome requires a command line parameter --force-renderer-accessibility

    to enable support for Microsoft UI Automation in Chrome. So if you run Chrome, it should work for you. If you are trying to connect to an existing Chrome window, this could be a problem.

  • Must be explicitly used backend='uia'

    for an object pywinauto.Application

    . See Getting Started Guide , basic concept and other helpful stuff for more details .



Relevant part of the mentioned script:

from pywinauto import Application

chrome_dir = r'"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"'

# start Chrome
chrome = Application(backend='uia')
chrome.start(chrome_dir + ' --force-renderer-accessibility --incognito --start-maximized <URL>')

# wait while page is loading (up to 10 sec.)
chrome['<Tab caption>'].child_window(title_re='Reload.*', control_type='Button').wait('visible', timeout=10)

      

+1


source


the details of this may depend on your operating system, but in windows I can access the "master_preferences" file in the C:> Program Files> Google> Chrome> folder.

the file content looks like this:

{
    "homepage": "http://www.google.com/",
    "homepage_is_newtabpage": false,
    "distribution": {
        "suppress_first_run_bubble": false,
        "import_search_engine": false,
        "import_history": false,
        "do_not_launch_chrome": true,
        "make_chrome_default": false,
        "verbose_logging": false,
        "ping_delay": -60
    },
    "sync_promo": {
        "show_on_first_run_allowed": false
    },
    "session": {
        "restore_on_startup": 4,
        "startup_urls": ["http://www.google.com/"]
    },
    "first_run_tabs": ["http://www.google.com/", "http://welcome_page"]
}

      

You can see that there are parameters for restore_on_startup and startup_urls under the "session" heading



try editing these settings to look like this:

"restore_on_startup": 2,
"startup_urls": ["http://www.google.com/", "http://www.theurlyouwant.com"]

      

You may not be able to configure these settings on your work or school computer, as this requires administrator rights. Also, if you are not familiar with JSON, pay special attention to the syntax (commas, quotes, etc.) that I used in my examples.

+1


source


I don't know if that helps, it's certainly not as a technical answer as everyone else has, but I'm using the OneTab Chrome Extension to do some of the things you're talking about.

I have a few pages saved on it and I click the Recover All button and they all load. You can save groups of tabs and lock these groups so that they are not easily deleted in case of a crash, but groups of names of saved tabs. I think this is very helpful, but it might not be exactly what you are looking for / need. Hope it helps!

0


source







All Articles