0758 发表于 2011-7-26 19:27:39

热键一样,通过au3热键放行程序的热键.

定义AU3alt+t 热键,要启动的程序也是Alt+t热键弹出的,现在怎样通过au3热键设置密码才能放行程序的热键呢?

daiyu116 发表于 2011-7-26 19:45:23

回复 1# 0758

把你定义的AU3的 alt+t 热键,改掉不行吗?

0758 发表于 2011-7-27 13:38:38

不行的,我就是用AU3保护程序的热键

都市浪子666 发表于 2011-7-27 23:35:11




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






把上面代码编译之后试试看

0758 发表于 2011-7-28 22:20:01

非常感谢楼上的代码,经过测试,热键还是不能恢复,

minterz 发表于 2011-7-30 11:19:11

Call("un_HotKey")
??
页: [1]
查看完整版本: 热键一样,通过au3热键放行程序的热键.