AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Prevent Applications from Stealing Focus

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Antonimo



Joined: 28 Apr 2006
Posts: 55

PostPosted: Thu Feb 12, 2009 8:39 am    Post subject: Prevent Applications from Stealing Focus Reply with quote

This is not a good script - it is a collection of three files that can be used to prevent applications from stealing focus.

Notes:
Tested in Windows XP Pro SP3
Path names will vary according to where you save the files

Don't_Steal_Focus.reg
Code:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Desktop]
"ForegroundLockTimeout"=dword:00030d40


Don't_Steal_Focus.bat
Code:
regedit /s Don't_Steal_Focus.reg


Don't_Steal_Focus.ahk
Code:
Loop
{
Sleep 5000
run, "C:\Program Files\AutoHotkey Scripts\Don't_Steal_Focus\Don't_Steal_Focus.bat"
}


The reason why I am putting these up here is in the hope that somebody finds them useful and then decides to create one simple AHK script.

[Deleted double post. ~jaco0646]
Back to top
View user's profile Send private message
Thrawn



Joined: 12 May 2008
Posts: 30
Location: Germany

PostPosted: Thu Feb 12, 2009 10:20 am    Post subject: Reply with quote

Code:
Loop
{
   Sleep, 5000
   RegWrite, REG_DWORD, HKEY_CURRENT_USER, Control Panel\Desktop, ForegroundLockTimeout, 0x00030d40
}
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group