I have a similar workflow that I've used in Safari and I've used the Edit Name Feature to make it easier to move from one site to another.
If I bring up a chart of SSO in Stockcharts.com and create a Bookmark, the Bookmarks Toolbar Menu shows it as SSO - Stockcharts Workbench - Stockcharts.Com.
Then I "Show All Bookmarks", right-click (control click) edit the name SSO - Stockcharts Workbench - Stockcharts.Com to be just SSO.
This now appears as SSO on my bookmark toolbar list. To switch to this bookmark, I can choose it under the Bookmarks menu or Bookmarks Toolbar. What I usually do is use Cmd L which highlights the address bar, type SSO and Safari displays a short list of History and Bookmarks. I scroll down to SSO under Bookmarks and hit "Enter" for my SSO chart. This bypasses using the mouse and gets me right to the chart with just a few keystrokes.
As another example, I get to Apple with CMD L, AAPL, cursor down to AAPL site I want and hit Enter.
Here's a screenshot for AAPL with several bookmarked sites that include AAPL.
I like using Cmd L for two reasons. I can move from one bookmark to another without needing to use my mouse or trackpad. Plus the shortened SSO Name sits on my Bookmark Toolbar using much less space than if I added it to the Toolbar with the original bookmark title.
Here is an AppleScript that should help you. Open AppleScript Editor and save this as a script. I have modified the source that I found here to support taking arguments on the command line.
Use it like this:
osascript new_window.scpt http://www.google.com http://www.stackoverflow.com
Of course, replace the URLs above with your own URLs.
new_window.scpt
on run argv
tell application "Safari"
if (count argv) = 0 then
-- If you dont want to open a new window for an empty list, replace the
-- following line with just "return"
set {first_url, rest_urls} to {"", {}}
else
-- `item 1 of ...` gets the first item of a list, `rest of ...` gets
-- everything after the first item of a list. We treat the two
-- differently because the first item must be placed in a new window, but
-- everything else must be placed in a new tab.
set {first_url, rest_urls} to {item 1 of argv, the rest of argv}
end if
make new document at end of documents with properties {URL:first_url}
tell window 1
repeat with the_url in rest_urls
make new tab at end of tabs with properties {URL:the_url}
end repeat
end tell
activate
end tell
end run
You could even create an alias for this in Terminal and be able to use it easier. I would add the following to ~/.bash_profile
:
alias newwindow='osascript /path/to/new_window.scpt'
Call newwindow
whatever you want. Save .bash_profile
and restart Terminal for it to work.
In case anyone is looking for a similar solution for Google Chrome, here is a different take on the same idea.
chrome_new_window.scpt
on run argv
tell application "Google Chrome"
if (count argv) = 0 then
make new window
else
tell (make new window)
set URL of active tab to item 1 of argv
repeat with the_url in the rest of argv
open location the_url
end repeat
end tell
end if
set active tab index of first window to 1
activate
end tell
end run
Best Answer
Will open this page (in the default browser).