Skip to content

Instantly share code, notes, and snippets.

@sidouglas
Last active December 24, 2022 02:11
Show Gist options
  • Save sidouglas/df2bc18f9fbdb893dba69828ba54d3f1 to your computer and use it in GitHub Desktop.
Save sidouglas/df2bc18f9fbdb893dba69828ba54d3f1 to your computer and use it in GitHub Desktop.
Activate All Brave Windows containing substring title
tell application "Brave Browser"
activate
repeat with w in (windows)
set j to 0
repeat with t in (tabs of w)
set j to j + 1
if title of t contains "YOUR_NAME" then
set (active tab index of w) to j
set index of w to 1
tell application "System Events" to tell process "Brave Browser"
perform action "AXRaise" of window 1 -- `set index` doesn't always raise the window
end tell
return true
end if
end repeat
end repeat
return false
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment