I was hoping that the following code would do the job, but no cigar:
--Only the window is brought into focus
tell application "Google Chrome"
activate tab 1 of window 1
end tell
|
I was hoping that the following code would do the job, but no cigar:
| ||||
|
feedback
|
|
Google Chrome is, in fact, scriptable.
Works like a charm for version 10.0.648.204. While it would be nice to do something like the following:
It's not possible, since
| |||||||||||||
feedback
|
|
Google Chrome isn't scriptable (that is, it doesn't understand Apple Events). You can script it the hard way using the Accessibility API (which you need to turn on in System Preferences > System > Universal Access; see the "Enable access for assistive devices" checkbox at the bottom); this is done via the Processes suite of System Events. Unfortunately, this is extremely painful in the general case, but something like
might suffice. If it doesn't, then you'll need to explicitly dig the tab element out of the widget tree; Apple has some sample code that can help you find UI elements. | ||||
feedback
|