Open 2 urls with specific chrome profile
-
- Posts: 24
- Joined: 12 Feb 2017, 23:26
Open 2 urls with specific chrome profile
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)
Re: Open 2 urls with specific chrome profile
Have you played with something like this already??
https://www.ghacks.net/2013/10/06/list- ... -switches/
https://peter.sh/experiments/chromium-c ... -extension
https://www.ghacks.net/2013/10/06/list- ... -switches/
https://peter.sh/experiments/chromium-c ... -extension
-
- Posts: 24
- Joined: 12 Feb 2017, 23:26
Re: Open 2 urls with specific chrome profile
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.
Re: Open 2 urls with specific chrome profile
Code: Select all
#NoEnv
#SingleInstance force
ChromeUrls =
(Join`s
"https://autohotkey.com/boards/viewforum.php?f=4"
"https://autohotkey.com/boards/viewforum.php?f=5"
"https://autohotkey.com/boards/viewtopic.php?f=5&t=37347&sid=ab796fd13e8d43caad178ceebcb0bc41"
)
PathChrome := "X:\PortableApps\GoogleChromePortable\GoogleChromePortable.exe"
Run %PathChrome% %ChromeUrls%,,Max
ExitApp
Donec Perficiam
-
- Posts: 24
- Joined: 12 Feb 2017, 23:26
Re: Open 2 urls with specific chrome profile
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.jmeneses wrote:Code: Select all
#NoEnv #SingleInstance force ChromeUrls = (Join`s "https://autohotkey.com/boards/viewforum.php?f=4" "https://autohotkey.com/boards/viewforum.php?f=5" "https://autohotkey.com/boards/viewtopic.php?f=5&t=37347&sid=ab796fd13e8d43caad178ceebcb0bc41" ) PathChrome := "X:\PortableApps\GoogleChromePortable\GoogleChromePortable.exe" Run %PathChrome% %ChromeUrls%,,Max ExitApp
Re: Open 2 urls with specific chrome profile
Code: Select all
#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
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.
-
- Posts: 24
- Joined: 12 Feb 2017, 23:26
Re: Open 2 urls with specific chrome profile
This worked almost perfect,BoBo wrote:Tested with two already existing/logged in instances/profiles as well as it is creating those from scratch.Code: Select all
#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
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.
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.
Who is online
Users browsing this forum: Araphen, Descolada, Google [Bot], Oblomov228 and 173 guests