quote:
Originally posted by roflmao456
JScript code:
if(Interop.Call("user32", "GetForegroundWindow") == ChatWnd.Handle){
// chatwnd is focused
} else {
// chatwnd is not focused
}
(not tested but should work)
Thanks a lot!
I was confused at first, cause I replaced "user32" (with quotes) to the parameter "Origin" (without quotes), thinking user32 was the generic term you threw in there for any random person's chat window. But I googled it and found others using "user32.dll", so I used that, and it works! I don't know if only "user32" would've worked, I didn't try it lol.
anyway, thanks for helping me!