That's really strange, I've got the same problem. My script works fine on my computer... and with my father's computer, it do not....
I'm gonna see what I can do.... but I'm not sure I can do something !!
---------------------------
EDIT : Problem found !!!
In fact, before putting the window at the foreground, I have to restore this window xD !
code:
Interop.Call("User32.dll","ShowWindow",Handle,9); // 9=SW_RESTORE
Now, this script should work fine !
>>> Download AutoForeground !
(IMPORTANT : Maybe you will have to delete you internet cache, I've got a problem to download the new version with Firefox until I delete my internet cache
)
---------------------------
Do you think it will be useful for you if I insert commands ??
For exemple : /afon (AutoForeground On)
/afoff (AutoForeground Off)