Do you guys know how to activate the n-th Google Chrome window with Applescript? For example, if I have three Google Chrome windows opened, how do activate the second?
As mklement mentioned, changing the index raises the window, but for example keyboard shortcuts are still registered by the previously frontmost window.
tell application "Google Chrome"
set index of window 2 to 1
end tell
Another option is to tell System Events to AXRaise window 1:
tell application "Google Chrome"
set index of window 2 to 1
end tell
tell application "System Events" to tell process "Google Chrome"
perform action "AXRaise" of window 1
end tell