I thought I once saw a KM macro here that displayed a list of open tabs in Google Chrome and allowed the user to copy the page title and URL to the clipboard by selecting it from the list.
I've searched but didn't find it.
Is it possible to do this with KM? Any guidance would be appreciated.
The Applescript below is also pretty handy in some situations. This is what it does:
Displays a dialogue box with a list of the page titles and URLs of all open tabs (in Google Chrome).
Allows the User to select one.
Copies the title and URL of the tab selected to the clipboard.
NOTES
Works in Google Chrome. Hasn't been modified to work with Safari. I haven't been able to modify to work in Firefox,
Chrome needs to be open of course but it doesn't need to be the frontmost application to run.
SCRIPT
-- Display a list of page titles and URL's for all open tabs in Google Chrome
-- Allow user to select one from from the list.
-- Copy the page title and URL of the selection to the clipboard.
set titleString to ""
set urlList to {}
tell application "Google Chrome"
set window_list to every window # get the windows
repeat with the_window in window_list # for every window
set tab_list to every tab in the_window # get the tabs
repeat with the_tab in tab_list # for every tab
set the_url to the URL of the_tab # grab the URL
set the_title to the title of the_tab # grab the title
set titleString to titleString & the_title & " - " & the_url & return # concatenate
set end of urlList to {the_url, the_title}
end repeat
end repeat
end tell
set chosenItem to (choose from list paragraphs of titleString with prompt "Select a URL and page title:") as text
repeat with i from 1 to length of urlList
set thisItem to item i of urlList
if chosenItem contains (item 2 of thisItem) then
set the clipboard to (item 2 of thisItem) & " - " & (item 1 of thisItem)
exit repeat
end if
end repeat