Hey,
I'm trying to send Keydowns to Aion, I tried a few methods but nothing worked yet:
Both doesn't work... Can someone help me please?
Greets!
I'm trying to send Keydowns to Aion, I tried a few methods but nothing worked yet:
Code:
#include <windows.h>
int main()
{
INPUT ip;
Sleep(5000);
ip.type = INPUT_KEYBOARD;
ip.ki.wScan = 0;
ip.ki.time = 0;
ip.ki.dwExtraInfo = 0;
ip.ki.wVk = 0x41;
ip.ki.dwFlags = 0;
SendInput(1, &ip, sizeof(INPUT));
Sleep(1000);
ip.ki.dwFlags = KEYEVENTF_KEYUP;
SendInput(1, &ip, sizeof(INPUT));
return 0;
}
Code:
#include <iostream>
#include <Windows.h>
using namespace std;
int main()
{
HWND hWnd = FindWindowA(NULL, "AION Client");
if(!hWnd)
{
cout << "HWND Failed" << endl;
getchar();
getchar();
exit(1);
}
Sleep(5000);
PostMessage(hWnd, WM_LBUTTONDOWN, NULL, NULL);
Sleep(100);
PostMessage(hWnd, WM_LBUTTONUP, NULL, NULL);
}
Greets!