#SingleInstance force
#Persistent
SendMode Input  
SetBatchLines -1
return

$!F4::  ;$作用等同于钩子
wid2:=WinExist("A")
winget, wida,id,ahk_class Shell_TrayWnd
winget,widb,ID, % "Program Manager"
IF (wid2 = wida) or (wid2=widb)
{
    msgbox,64,提醒,桌面和任务栏上禁用ALT+F4,2
    return
}
SendInput !{F4}
return