Skip to content

Instantly share code, notes, and snippets.

@juandesant
Created April 8, 2020 17:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juandesant/50caf26d0b1a2d254c4ba9881311e6b3 to your computer and use it in GitHub Desktop.
Save juandesant/50caf26d0b1a2d254c4ba9881311e6b3 to your computer and use it in GitHub Desktop.
Get all URLs from all tabs in all Safari windows
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