PulseAugur
EN
LIVE 06:46:59

How to count open Safari browser tabs using AppleScript

Simon Willison shared a brief tip on how to count open Safari browser tabs using AppleScript. The command `osascript -e 'tell application "Safari" to count tabs of every window'` can be used to achieve this. AI

RANK_REASON The item is a personal blog post sharing a technical tip, not a major industry event.

Read on Simon Willison →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

How to count open Safari browser tabs using AppleScript

COVERAGE [1]

  1. Simon Willison TIER_1 English(EN) ·

    Count the number of Safari tabs

    <p>Tiniest TIL, using AppleScript to count the number of open browser tabs in Safari:</p> <pre><code>osascript -e 'tell application "Safari" to count tabs of every window' </code></pre> <p><img alt="I ran it in a terminal window and got back 370." src="https://static.simonwilliso…