Simon Willison · · 1 min read

Count the number of Safari tabs

Mirrored from Simon Willison for archival readability. Support the source by reading on the original site.

Tiniest TIL, using AppleScript to count the number of open browser tabs in Safari:

osascript -e 'tell application "Safari" to count tabs of every window'

I ran it in a terminal window and got back 370.

Tags: safari, til, applescript

Discussion (0)

Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.

Sign in →

No comments yet. Sign in and be the first to say something.

More from Simon Willison