If I understood well your message, that's fixed !
With these lines :
Before :
code:
Interop.Call("User32.dll","ShowWindow",ChatWnd.Handle,9); Interop.Call("User32.dll","SetForegroundWindow",ChatWnd.Handle);
After :
code:
HandleActiveWindow=Interop.Call("User32.dll","GetActiveWindow");
OnForeground=0
Windows = Messenger.CurrentChats
e = new Enumerator(Windows)
for(;!e.atEnd();e.moveNext()) {
if (e.item().Handle==HandleActiveWindow) {
OnForeground=1
}
}
if (OnForeground==0&&HandleActiveWindow!=ChatWnd.Handle) {
Interop.Call("User32.dll","ShowWindow",ChatWnd.Handle,9);
Interop.Call("User32.dll","SetForegroundWindow",ChatWnd.Handle);
}
I hope that it is what you want....
I use Tabs too, and I think the Tabs are located in a window attached to the top of chat windows, so, there's no problem with the Tabs.... Now ! (I tested my script with tabs, there's no problem, I think...)
The link, one more time... xD
>> AutoForeground 1.1