2

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.

3
  • i understand why things behave this way, i just want to tweak that a little. May 25, 2010 at 20:05
  • Is there a way to address this issue on the Mac?
    – user104268
    Nov 5, 2011 at 18:15
  • i think this is a duplicate, but i much prefer this answer over that question's answer because it doesn't require downloading a 3rd party tool. Jun 11, 2015 at 16:01

3 Answers 3

3

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.

1
  • Darn, beat me to it! LOL
    – BearGriz72
    May 25, 2010 at 20:33
0

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

0

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

Not the answer you're looking for? Browse other questions tagged .