Way to lock window focus (not just pin to top)?

NoQuarter

Golden Member
Jan 1, 2001
1,006
0
76
Anyone know of an way to force Windows to maintain focus on a window? I've tried DeskPins which is close to what I'm looking for.. it allows you to designate a window as always on top, but the window can still lose focus.


What I'm looking for is a way to prevent that window from being able to lose focus at all.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
If a window can not lose focus - then you can not do anything else on a Windows system that interacts with the user. That includes any controls/dialog boxes, etc
 

NoQuarter

Golden Member
Jan 1, 2001
1,006
0
76
Yea I've discovered this now. Closest I've got to getting where I want is writing up this little script:

Set WshShell = WScript.CreateObject("WScript.Shell")
i=1
Do
WshShell.AppActivate("The Lord of the Rings Online")
WScript.Sleep(130)
i = i + 1
Loop Until i = 200


The 130ms sleep gives the system enough time to process the click in web browser on the 2nd monitor while switching it back to the game so my key presses don't get lost too much. Also had to disable the Foreground lock in registry.



Now I just need a way to enable/disable the script so I can remove the loop counter. Maybe it's easy to turn into a VB app or something I have no idea.