28-07-2009, 08:10 AM
Wrote this up for RootSource on OGC, figured you guys could benefit from it?
Nean Wrote:I just spent the last two and a half hours working on this, so somebody better appreciate it. For spending so long, it's a very few lines of code. Anyways here goes
Add:in ModInputCode:Public Declare Function GetForegroundWindow Lib "user32" () As Long
Then replace:Code:Call CheckInputKeys ' Check which keys were pressed
With:Code:If GetForegroundWindow() = frmMainGame.hwnd Then
Call CheckInputKeys ' Check which keys were pressed
End If
Voila, done. Now it only responds if the current window is RootSource