Browse the docs

safariTabCount

Returns how many tabs the front window of Safari has.

Keyboard Maestro: SAFARITABCOUNT

Details #

safariTabCount() takes no arguments and returns a number: the count of tabs in the front window of Safari.

Parameters #

Takes 0 arguments. {{ safariTabCount() }}

Examples #

safariTabCount()
→ 0

Gotchas #

  • Needs Automation permission for the browser (System Settings, Privacy & Security, Automation). Without it, or when the browser isn't running, the answer is 0.

  • Only the front window is counted, not every window.