发送数字键1 2 3是成功的
DllCall("user32.dll", "int", "PostMessage", _
"hwnd", $hWindowsHandle, _
"int", $WM_KEYDOWN, _
"int", 0x31, _
"int", 0)
Sleep(100)
DllCall("user32.dll", "int", "PostMessage", _
"hwnd", $hWindowsHandle, _
"int", $WM_KEYUP, _
"int", 0x31, _
"int", 0)
发送alt+a 却不行
DllCall("user32.dll", "int", "PostMessage", _
"hwnd", $hWindowsHandle, _
"int", $WM_SYSKEYDOWN, _
"int", 0x12, _
"int", 0)
Sleep(100)
DllCall("user32.dll", "int", "PostMessage", _
"hwnd", $hWindowsHandle, _
"int", $WM_KEYDOWN, _
"int", 0x41, _
"int", 0)
Sleep(100)
DllCall("user32.dll", "int", "PostMessage", _
"hwnd", $hWindowsHandle, _
"int", $WM_KEYUP, _
"int", 0x41, _
"int", 0)
Sleep(100)
DllCall("user32.dll", "int", "PostMessage", _
"hwnd", $hWindowsHandle, _
"int", $WM_SYSKEYUP, _
"int", 0x12, _
"int", 0)
[ 本帖最后由 sxd 于 2009-4-18 00:43 编辑 ] |