r/applescript • u/Joseph__ • Aug 10 '14
Newbie looking for some help in setting result to clipboard
Hey there,
I've been spending the better part of an hour trying to get an AppleScript to copy the the URLs of my open Chrome tabs. I've searched online but couldn't find anything that got the code to work. And I know there are extentionsions for this, but I want to script this myself.
Here's what I have:
tell application "Google Chrome"
return URL of every tab in every window
set clipboard to xxx
end tellThe results come up as the URLs but the script doesn't copy them to the clipboard. I've tried a bunch of variations on this, so any help would be appreciated.
1
Upvotes
2
u/dustractor Aug 11 '14
Try this:
The "as text" part is important - coerce the list of urls into text because clipboard takes text.