I'd like to have a macro that copies the URLs of all the tabs open in the currently front Chrome window.
So, for example, let's say I have a Chrome window open with three tabs in the following order: Wired, ESPN, and CNN. Triggering this macro would copy the following to my system clipboard, each on its own line...
I don't have Chrome, but I decided to take up your challenge and do this for Safari. It seems to work fine, and you shouldn't have much problem modifying it to work with Chrome. I see one function call, one token, and one action that you will have to change.
There are probably other ways to solve this, including AppleScript, but this seems to be a simple way to do it.
tell application "Google Chrome" to tell window 1 to set theURLs to URL of every tab
set {TID, text item delimiters} to {text item delimiters, ", "}
set theURLs to text items of theURLs
set text item delimiters to return
set theURLs to theURLs as text
set text item delimiters to TID
return theURLs