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.

Say i'm coding in emacs and want to start up a music program. Because it takes too long to start up i go back to coding and type away.

When the music application starts up, the focus is stolen (gasp! stolen!) away from emacs and goes to the music application, often mid-thought.

Is there any way to keep this from happening and have the newly started application not have focus until i see that it's up and ready to be used?

Besides getting rid of my ADD of course. Or getting an impossibly fast computer that can keep up with my mind.

i'm using a Windows XP system, but i will soon have a Windows 7 system, and i have Linux at home.

share|improve this question
    
i understand why things behave this way, i just want to tweak that a little. –  Jugglingnutcase May 25 '10 at 20:05
    
Is there a way to address this issue on the Mac? –  user104268 Nov 5 '11 at 18:15
add comment

3 Answers 3

up vote 3 down vote accepted

Create a shortcut to the music application, open its (the shortcut's) properties, and select Run Minimized in the dropdown. Save this shortcut on your desktop and use it when you want to start your app without losing focus. You probably won't know when it has fully launched without opening its window, but you can do that at a time of your choosing.

share|improve this answer
    
Darn, beat me to it! LOL –  BearGriz72 May 25 '10 at 20:33
    
Wow, that was easy. Thanks! –  Jugglingnutcase May 26 '10 at 13:18
add comment

although the question is a little old and already has an accepted answer, I think I have found a better way to do what you want to (at least in Windows).

I've tested it on Windows 8.1, where it works for me. I expect it to work with Windows 7 and XP also.

Here's How:

  1. Click on Start and then Run.
  2. In the text box in the Run window, type regedit and click OK. This will open the Registry Editor program.
  3. Locate the HKEY_CURRENT_USER folder under My Computer and click on the (+) sign next the folder name to expand the folder.
  4. Continue to expand folders until you reach the HKEY_CURRENT_USER\Control Panel registry key.
  5. Select the Desktop key under Control Panel.
  6. On the right-hand side of the screen, locate and double-click on the ForegroundLockTimeout DWORD.
  7. In the Edit DWORD Value window that appears, set the Value data: field to 30d40. Note: Make sure the Base option is set to Hexadecimal when entering the DWORD value.
  8. Click OK and then close Registry Editor.
  9. Reboot your PC for the changes you made to take effect.

From this point forward, programs should no longer steal the focus from the window that you're currently working in.

Found: here

share|improve this answer
add comment

Maybe you can try Devil's pie to perform various actions on windows.

share|improve this answer
add comment

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.