这是我的代码希望任何善良的灵魂都能帮助我。 其他键如Alphabets或Home或PgUp等......正在运行。除了所有的箭头。
void AutoMove (HWND hWnd)
{
BOOL bWorked = FALSE;
int value = 0;
LPARAM lparam = (MapVirtualKey(0x025, 0) << 16) + 1; //Send to graphic screen
HWND MSHWND = FindWindow ("MapleStoryClass",0); //Find class window
value = GetDlgItemInt(hWnd, IDC_GETAUTOMOVE, &bWorked, 0);
SetDlgItemText(hWnd, IDC_AUTOMOVE, "On" ); //"On" message
while (!AutoMoveExit)
{
PM(MSHWND, WM_KEYDOWN, 0x025, lparam); //Send Left Arrow Key
Sleep (1000);
PM(MSHWND, WM_KEYUP, 0x025, NULL);
Sleep (value);
}
SetDlgItemText(hWnd, IDC_AUTOMOVE, "Off" ); //"Off" Message
}
答案 0 :(得分:0)
尚未测试,但您可以尝试忽略lParam
这样的值:
PostMessage(MSHWND, WM_KEYDOWN, VK_LEFT, 0)