Created
August 15, 2018 15:46
-
-
Save rex/29f117df5953c12f081b01a285fb2b2e to your computer and use it in GitHub Desktop.
Applescript snippet to copy all URLs from all open tabs in front-most Safari window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------------------------ | |
# Auth: Christopher Stone | |
# dCre: 2017/11/15 00:00 | |
# dMod: 2017/11/15 00:03 | |
# Appl: Safari | |
# Task: Put URLs of all tabs of the front window on the clipboard. | |
# Libs: None | |
# Osax: None | |
# Tags: @Applescript, @Script, @Safari, @Put, @URLs, @All, @Tabs, @Front, @Window, @Clipboard | |
------------------------------------------------------------------------------ | |
tell application "Safari" | |
tell front window | |
if its document exists then | |
set AppleScript's text item delimiters to linefeed | |
set urlList to URL of its tabs | |
set the clipboard to (urlList as text) | |
end if | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment