Windows – send keystroke to window under cursor ( prevent focus stealing )

autohotkeyscriptwindow focuswindows 7

i m playing poker on a couple of pokersites with the help of several ahk scripts to send hotkeys to table (window) under mouse.

one pokerroom (carbon poker) though, keeps stealing focus and activates the window when its my turn, so the keystroke, even when i m over another table ( program ) gets send to this table which causes unwanted bets or folds 🙂

i was searching the interweb for a solution to prevent focus stealing in windows 7 but couldnt find anything.

so i guess the best solution is an additional program that insures that keystrokes are send to window under cursor.

would sb pls help me find or write such an app/script

thx in advane

jin

found help in the autohotkey.com community:

#Persistent
#WinActivateForce

SetTimer, CheckActive, 5
return

CheckActive:
 MouseGetPos,,,window
  WinActivate, ahk_id %window%
Return

Best Answer

The Microsoft power toy Tweak UI implements this.

https://en.wikipedia.org/wiki/Tweak_UI

Under the mouse section Activation follows mouse (X-Mouse), it has a default timer of 1000ms which you can change.

Related Question