Hi,
this "stealing focus" AutoFunction in AutoHotkey is terrible. Although I know it's necessary I'm getting crazy always loosing my focused windows while I'm working in them. Even every reload of the script again resets the focus.
It's somehow like those big applications (we all know them) doing things automatically you don't want. I don't like that. At least there should be a function in AutoHotkey to enable/disable this behavior. There are cases when you don't really need this "WinActivate"-basics.
And of course, at the end AutoHotkey should reset SETFOREGROUNDLOCKTIMEOUT to the state before (automatically or manually). Is there any (hidden) function I missed?
Anyway, for the workaround I'm trying to reset it by DllCall. But it doesn't work (verified and resetted by TweakUI). So, what am I doing wrong?
Code:
SPI_SETFOREGROUNDLOCKTIMEOUT = 8193
SPIF_UPDATEINIFILE = 1
SPIF_SENDCHANGE = 2
DllCall("SystemParametersInfo", "UInt", 8193, "UInt", 0, "UInt", 0, "UInt", SPIF_UPDATEINIFILE | SPIF_SENDCHANGE)
Btw: I love AutoHotkey. A big thanx to the coders, scripters and all the other helpful people around here! 