|
发表于 2010-3-22 17:06:48
|
显示全部楼层
本帖最后由 lainline 于 2010-3-22 17:34 编辑
Send ("{APPSKEY}")
或是
_sendkey("93|93|1")
_sendkey("93|93|129")
Func _sendkey($msg);发送键盘按键消息
Local $GET,$vkCode,$scanCode,$flags
$GET=StringSplit($msg,"|",2)
$vkCode=$GET[0]
$scanCode=$GET[1]
$flags=$GET[2]
If $flags=128 Or $flags=129 Or $flags=160 Or $flags=161 Then
_winapi_keybd_event($vkCode,$scanCode,2)
ElseIf $flags=1 Then
_winapi_keybd_event($vkCode,$scanCode,1)
Else
_winapi_keybd_event($vkCode,$scanCode,0)
EndIf
EndFunc
Func _winapi_keybd_event($bVk,$bScan,$dwFlags,$dwExtraInfo="");发送按键信息
DllCall("user32.dll", "none", "keybd_event", "Byte", $bVk, "Byte", $bScan,"DWORD", $dwFlags,"DWORD", $dwExtraInfo)
If @error Then Return SetError(@error, @extended, False)
Return
EndFunc |
评分
-
查看全部评分
|