This should work.local iHandle = acFindWindowByTitleRegex("code.*")
if iHandle > 0 then
acActivateWindow(iHandle,0,0)
end
What is the exact and full title of the window?
Bring the Chrome window to the front (focus/active) and run this script:acMessageBox(acGetWindowTitle(acGetForegroundWindow()),"Title")
The pattern you have would match "code something - Google Chrome", but not "My code - Google Chrome" since it doesn't start with "code". Something like acFindWindowByTitleRegex(".*code.*") as the pattern would match "code" anywhere in the title; however, note that the pattern is case-sensitive. ".*code.*" would not match "My Code - Google Chrome", but would match "Lowercase code - Google Chrome".