Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On Windows Vista, I'm launching files associated with a Google Chrome "Application Shortcut" app by double-clicking them. While they will always open this way, they will sometimes not receive focus -- i.e. they sit in the task bar quietly but don't actually show in front on the screen (until I click on the app in the task bar again).

Does anyone know how I can force the just-opened app to receive focus?

The app being opened actually contains a web app I can customize, so I also have access to performing JavaScript commands post-startup. For background information, here is the regedit file I originally used to create the file association. Might well be this is a Google Chrome internal issue... apps I open with other editors get their focus alright, AFAIK. Thanks!

share|improve this question

1 Answer 1

AutoHotkey:

WinWaitActive, ,Google Chrome
WinActivate

you can change the title to something closer to your app to avoid conflict with other chrome windows.

share|improve this answer
    
Thanks. Would I still be able to call Google Chrome with several parameters, which is needed? (As shown in the linked reg file) –  Philipp Lenssen Oct 11 '09 at 9:46
    
As long as you specify part of the window title yes –  John T Oct 11 '09 at 14:22
    
I fixed your link. :) –  Sasha Chedygov Feb 5 '10 at 19:19
    
@music Thank you, I must have been in a hurry :) –  John T Feb 5 '10 at 20:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.