Created
April 8, 2020 17:02
-
-
Save juandesant/50caf26d0b1a2d254c4ba9881311e6b3 to your computer and use it in GitHub Desktop.
Get all URLs from all tabs in all Safari windows
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
tell application "Safari" | |
set theWindows to the windows | |
set theURLs to {} | |
repeat with theWindow in theWindow | |
set theTabs to the tabs of theWindow | |
repeat with theTab in theTabs | |
copy the URL of theTab to the end of theURLs | |
end repeat | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment