Skip to content

Instantly share code, notes, and snippets.

@thefloodshark
Created April 2, 2018 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thefloodshark/025b6677cc658f5d1fb2924fc3be82c6 to your computer and use it in GitHub Desktop.
Save thefloodshark/025b6677cc658f5d1fb2924fc3be82c6 to your computer and use it in GitHub Desktop.
Open List of URLs in New Tabs or Browser
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; Array of URLs you want to open
urlA := ["https://example.com"
,"https://example2.com"
,"https://example3.com"
,"https://example4.com"]
; Build list of urls on one line
urlList := ""
for index, value in urlA
urlList .= ((A_Index = 1) ? "" : " ") . value
return
; Open URLs in already opened Chrome window
^!m::Run, % "chrome.exe " urlList
; Make a new Chrome window and open URLs there
^!n::Run, % "chrome.exe --new-window " urlList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment