Last active
July 15, 2016 14:39
-
-
Save vtambourine/ba7fed3bf2de32ab1fe8737da6e1a084 to your computer and use it in GitHub Desktop.
Close all Google Search tabs in all Chrome windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set googleTabs to {} | |
tell application "Google Chrome" | |
repeat with theWindow in every window | |
repeat with theTab in every tab of theWindow | |
tell theTab | |
if title contains "- Google Search" then | |
set googleTabs to googleTabs & {theTab} | |
end if | |
end tell | |
end repeat | |
end repeat | |
end tell | |
repeat with theTab in googleTabs | |
close theTab | |
end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment