找回密码
 加入
搜索
查看: 3280|回复: 11

[AU3基础] 请问如何屏蔽掉DEL键 已解决

  [复制链接]
发表于 2010-11-13 21:06:28 | 显示全部楼层 |阅读模式
本帖最后由 zzm0163 于 2010-11-15 10:01 编辑

网吧计费系统被破解,需要屏蔽掉这个键。请高手指点

评分

参与人数 1金钱 +10 收起 理由
afan + 10 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

 楼主| 发表于 2010-11-13 21:50:50 | 显示全部楼层
各位老大,帮下忙 。急
发表于 2010-11-13 22:19:57 | 显示全部楼层
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <StructureConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)

Global $hHook, $hStub_KeyProc, $buf = "", $title = "", $title_1 = "", $keycode, $buffer = "", $nMsg

Local $hmod
$hStub_KeyProc = DllCallbackRegister("_KeyProc", "long", "int;wparam;lparam")
$hmod = _WinAPI_GetModuleHandle(0)
$hHook = _WinAPI_SetWindowsHookEx($WH_KEYBOARD_LL, DllCallbackGetPtr($hStub_KeyProc), $hmod)
While 1
        Sleep(1)
WEnd

Func _KeyProc($nCode, $wParam, $lParam)
        Local $tKEYHOOKS, $wVKey
        $tKEYHOOKS = DllStructCreate($tagKBDLLHOOKSTRUCT, $lParam)
        If $nCode < 0 Then
                Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
        EndIf
        $wVKey = DllStructGetData($tKEYHOOKS, "vkCode")
                If $wVKey=0x1b Then _exit()
        If ($wVKey = 0x2e) Then
                If ($wParam = $WM_KEYDOWN) Then
                        ToolTip("{del} was pressed.")
                        Return 1
                EndIf
        EndIf
        Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
EndFunc        ;==>_KeyProc

Func _exit()
        _WinAPI_UnhookWindowsHookEx($hHook)
        DllCallbackFree($hStub_KeyProc)
        Exit
EndFunc   ;==>_exit

评分

参与人数 1金钱 +30 收起 理由
afan + 30

查看全部评分

 楼主| 发表于 2010-11-14 12:17:54 | 显示全部楼层
万分感谢
 楼主| 发表于 2010-11-14 12:19:02 | 显示全部楼层
这个只有脚本在运行的时候才能屏蔽,退出脚本后,就不行了。有没有直接写入系统的方法呢。
发表于 2010-11-15 09:28:27 | 显示全部楼层
循环语句太占内存了,有没有其它的方法??
发表于 2010-11-15 09:56:08 | 显示全部楼层
回复 6# m765555
你知不知道自己在说什么?
发表于 2010-11-15 11:12:24 | 显示全部楼层
难道我说的不是那样的吗,真是很占呀,80%到90%,
发表于 2010-11-15 11:13:46 | 显示全部楼层
回复 8# m765555


我是说所有的循环语句占系统资源,我又没说针对你的源码,晕
发表于 2010-12-25 23:20:41 | 显示全部楼层
正好需要,学习了!!
发表于 2013-9-8 18:47:32 | 显示全部楼层
请问组合键怎样屏蔽呢?
发表于 2013-9-8 18:47:34 | 显示全部楼层
请问组合键怎样屏蔽呢?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-20 19:36 , Processed in 0.103555 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表