itiauto 0 Posted July 21, 2017 Hello, Can you help me to intercept ALT+F4 key under Windows 10 ? Work fine on Windows 7 but not on Windows 10. I take the example code from autoit : Quote HotKeySet("!{F4}", "HotKeyPressed") While 1 Sleep(100) WEnd Func HotKeyPressed() msgbox(0,"ALT+F4","Intercepted") EndFunc ;==>HotKeyPressed Try with "#RequireAdmin" and try to modify sleep timer but same result. Someone has an idea for intercept ALT+F4 keys and not let Windows 10 close the window ? (AutoHotKey work without any problem under Windows 10) Thank you for your help Share this post Link to post Share on other sites
VIP 55 Posted July 21, 2017 (edited) Yes, not working on Windows 10! MsgBox(64,"ALT+F4",HotKeySet("!{F4}", "_FuncName") ? "OK" : "Failure") Func _FuncName() EndFunc Edited July 21, 2017 by Trong Regards, Share this post Link to post Share on other sites
Nikolas92 4 Posted July 21, 2017 (edited) it works from Scite, maybe it works only when started as 32 bit. Edited July 21, 2017 by Nikolas92 Share this post Link to post Share on other sites
VIP 55 Posted July 21, 2017 (edited) Not working with AutoIT (v3.3.14.2 /3.3.15.0) x32 and x64 with my Windows 10 x64 1703_15063.483 Edited July 21, 2017 by Trong Spell Regards, Share this post Link to post Share on other sites
itiauto 0 Posted July 21, 2017 @Nikolas92 : your script return "Failure" in the Scite and same error compiled x86 or x64.SciTE-Lite : 3.5.4 Share this post Link to post Share on other sites
NSUSpray 0 Posted April 29, 2019 I have the same. When will the problem be solved? GoodKeys is my main product made using Python and AutoIt https://forum.ableton.com/viewtopic.php?t=220718 Share this post Link to post Share on other sites
NSUSpray 0 Posted June 2, 2019 (edited) On bug tracker say it's not a bug: https://www.autoitscript.com/trac/autoit/ticket/3712 I use _HotKey_Assign from HotKey UDF to work around this problem. It works. #include <HotKey.au3> func foo()… _HotKey_Assign(BitOR ($CK_ALT, $VK_F4), "foo", $HK_FLAG_EXTENDEDCALL) Edited June 2, 2019 by NSUSpray GoodKeys is my main product made using Python and AutoIt https://forum.ableton.com/viewtopic.php?t=220718 Share this post Link to post Share on other sites