【 tulaoshi.com - 编程语言 】
躲避了NP的扫描现在就可以模拟了!
--------------------------------------------------------------------------------------------------------------------------------------------------------
需要VBAPI函数:
keybd_event←函数模拟了键盘行动
--------------------------------------------------------------------------------------------------------------------------------------------------------
相关API声明:
keybd_event
↓
PrivateDeclareSubkeybd_eventLib"user32"(ByValbVkAsByte,ByValScanAsByte,ByValdwFlagsAsLong,ByValdwExtraInfoAsLong)
--------------------------------------------------------------------------------------------------------------------------------------------------------
需要的控件:Timer(interval不为空)
--------------------------------------------------------------------------------------------------------------------------------------------------------
代码:
PrivateDeclareSubkeybd_eventLib"user32"(ByValbVkAsByte,ByValScanAsByte,ByValdwFlagsAsLong,ByValdwExtraInfoAsLong)
PrivateSubTimer1_Timer()
Callkeybd_event(82,0,0,0)'模拟按下"R"键
EndSub
--------------------------------------------------------------------------------------------------------------------------------------------------------
其它模拟:
方法一:
AppActivatesTitle
SendKeys"5"
方法二:
AppActivatesTitle
SendKeysvbKey5
方法三:
SendMessageHwnd,WM_KEYDOWN,vbKey5,0&
SendMessageHwnd,WM_KEYUP,vbKey5,0&
方法四:
AppActivatesTitle
keybd_event53,0,0,0
keybd_event53,0,KEYEVENTF_KEYUP,0
方法五:
PostMessagelHwnd,WM_KEYDOWN,vbKey5,0&
PostMessagelHwnd,WM_KEYUP,vbKey5,0&->