Open 2 urls with specific chrome profile

Get help with using AutoHotkey and its commands and hotkeys
Xproplayer
Posts: 11
Joined: 12 Feb 2017, 23:26

Open 2 urls with specific chrome profile

22 Sep 2017, 03:57

Hey guys, just trying to acomplish the title. All the docs I find so far just mention opening urls or with certain profiles but not both. Just want to open 2 urls with a specific chrome profile that will not already be open (cant do winactivate and then open url)
Xproplayer
Posts: 11
Joined: 12 Feb 2017, 23:26

Re: Open 2 urls with specific chrome profile

22 Sep 2017, 04:49

Already know some of the url parameters like so https://superuser.com/questions/876243/ ... ctivate-it just need to know how to add urls to it.
jmeneses
Posts: 402
Joined: 28 Oct 2014, 11:09

Re: Open 2 urls with specific chrome profile

22 Sep 2017, 04:58

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Xproplayer
Posts: 11
Joined: 12 Feb 2017, 23:26

Re: Open 2 urls with specific chrome profile

22 Sep 2017, 05:03

jmeneses wrote:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



I need the chrome to open with a specific profile, but this looks amazing. Whats the noenv and singleinstance force do, as I'd like to merge this with my master AHK script that does lots of other statements.
BoBo
Posts: 1610
Joined: 13 May 2014, 17:15

Re: Open 2 urls with specific chrome profile

22 Sep 2017, 05:38

Code: [Select all] [Download] GeSHi © Codebox Plus

#SingleInstance, Force

Run, "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --new-tab --profile-directory="chromeProfileName1" "https:\\www.autohotkey.com"
SoundBeep
Run, "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --new-tab --profile-directory="chromeProfileName2" "https:\\www.theguardian.co.uk"
SoundBeep
ExitApp
Tested with two already existing/logged in instances/profiles as well as it is creating those from scratch.
As you already know, once you run it that way you can work with its separate process PIDs to trigger those instances quite reliable.
Hope that helps.
Xproplayer
Posts: 11
Joined: 12 Feb 2017, 23:26

Re: Open 2 urls with specific chrome profile

23 Sep 2017, 23:32

BoBo wrote:

Code: [Select all] [Download] GeSHi © Codebox Plus

#SingleInstance, Force

Run, "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --new-tab --profile-directory="chromeProfileName1" "https:\\www.autohotkey.com"
SoundBeep
Run, "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --new-tab --profile-directory="chromeProfileName2" "https:\\www.theguardian.co.uk"
SoundBeep
ExitApp
Tested with two already existing/logged in instances/profiles as well as it is creating those from scratch.
As you already know, once you run it that way you can work with its separate process PIDs to trigger those instances quite reliable.
Hope that helps.

This worked almost perfect,

First I had to use "Profile 1" instead of "chromeProfileName1" but you may have used that as an intentional palceholder.
Also I was having issues with the hotkey firing multiple times and the tabs not opening in the same window. Two open more than 1 url I simply removed the --new-tab on the the first line, and add a 100-250ms delay.

Return to “Ask For Help”

Who is online

Users browsing this forum: boiler, evilC, holahapi, John316, RickC and 37 guests