Skip to content

Instantly share code, notes, and snippets.

@mahemoff
Last active August 29, 2015 14:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mahemoff/cb52bb5200e13a7b190b to your computer and use it in GitHub Desktop.
Save mahemoff/cb52bb5200e13a7b190b to your computer and use it in GitHub Desktop.
Automator script to fix Chrome's new user switcher (copied from attachment in https://code.google.com/p/chromium/issues/detail?id=112281)
on run {input, parameters}
tell application "Google Chrome"
activate
tell application "System Events"
tell process "Google Chrome"
set frontmost to true
set firstProfileSelected to (value of attribute "AXMenuItemMarkChar" of menu item 1 of menu "People" of menu bar 1) is "✓"
if firstProfileSelected is true then
click menu item 2 of menu "People" of menu bar 1
else
click menu item 1 of menu "People" of menu bar 1
end if
end tell
end tell
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment