Jump to content
Sign in to follow this  
itiauto

Windows 10 intercept alt+f4

Recommended Posts

itiauto

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

Yes, not working on Windows 10!
 

MsgBox(64,"ALT+F4",HotKeySet("!{F4}", "_FuncName") ? "OK" : "Failure")

Func _FuncName()

EndFunc

 

Edited by Trong

Regards,
 

Share this post


Link to post
Share on other sites
Nikolas92

it works from Scite, maybe it works only when started as 32 bit.

SnapCrab_No-0000.png

 

Edited by Nikolas92

Share this post


Link to post
Share on other sites
VIP

Not working with AutoIT (v3.3.14.2 /3.3.15.0) x32 and x64 with my Windows 10 x64 1703_15063.483
Windows10_x64.png

Edited by Trong
Spell

Regards,
 

Share this post


Link to post
Share on other sites
itiauto

@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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×