Browse the docs

frontBrowserTabCount

Returns how many tabs the front window of the front browser, whichever of Safari and Chrome was most recently in front has.

Keyboard Maestro: FRONTBROWSERTABCOUNT

Details #

frontBrowserTabCount() takes no arguments and returns a number: the count of tabs in the front window of the front browser, whichever of Safari and Chrome was most recently in front.

Parameters #

Takes 0 arguments. {{ frontBrowserTabCount() }}

Examples #

frontBrowserTabCount()
→ 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.