首页 > 开发 > 综合 > 正文

VB 从零开始编外挂(三)

2024-07-21 02:20:40
字体:
来源:转载
供稿:网友
躲避了np的扫描现在就可以模拟了!
--------------------------------------------------------------------------------------------------------------------------------------------------------
需要vb api函数:
keybd_event ←函数模拟了键盘行动
--------------------------------------------------------------------------------------------------------------------------------------------------------
相关api声明:
keybd_event

private declare sub keybd_event lib "user32" (byval bvk as byte, byval scan as byte, byval dwflags as long, byval dwextrainfo as long)
--------------------------------------------------------------------------------------------------------------------------------------------------------
需要的控件:timer(interval不为空)
--------------------------------------------------------------------------------------------------------------------------------------------------------
代码:
private declare sub keybd_event lib "user32" (byval bvk as byte, byval scan as byte, byval dwflags as long, byval dwextrainfo as long)
private sub timer1_timer()
call keybd_event(82, 0, 0, 0) '模拟按下"r"键
end sub
--------------------------------------------------------------------------------------------------------------------------------------------------------
其它模拟:
方法一:
appactivate stitle
sendkeys "5"
方法二:
appactivate stitle
sendkeys vbkey5
方法三:
sendmessage hwnd, wm_keydown, vbkey5, 0&
sendmessage hwnd, wm_keyup, vbkey5, 0&
方法四:
appactivate stitle
keybd_event 53, 0, 0, 0
keybd_event 53, 0, keyeventf_keyup, 0
方法五:
postmessage lhwnd, wm_keydown, vbkey5, 0&
postmessage lhwnd, wm_keyup, vbkey5, 0&

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表