wow! Amazingly enough, this discussion saved me a lot of time and energy searching the web.
It seems the Windows10 Creators Update broke something in the behavior of GetLastInputInfo .
And even though this post has nothing to do with autoit (sorry mods), i just wanted to say a big thank you @bobmcrae for providing a strange, but perfectly working solution still working on Windows10 Creators Update.