If StringInStr($CmdLineRaw, "/OK") Then
Call("un_HotKey")
EndIf
HotKeySet("!t", , "aaaa")
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 260, 105, 192, 124)
$Button1 = GUICtrlCreateButton("OK", 88, 48, 75, 25)
$Input1 = GUICtrlCreateInput("输入密码", 72, 8, 113, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$pass=GUICtrlRead($Input1)
if $pass="123456" Then
MsgBox(0,0,"密码正确 程序热键不拦截")
Run(@ScriptFullPath & " /OK")
exit
Else
MsgBox(0,0,"密码错误")
EndIf
EndSwitch
WEnd
Func aaaa ()
MsgBox(0,0,"程序热键被拦截")
EndFunc
Func un_HotKey ()
$ver=1
Do
Sleep(10)
Until $ver=2
EndFunc
把上面代码编译之后试试看 |