?
Hallo,
habe vor 8 Jahren so was ähliches gemacht, auszug aus quellcode datei:
...
INPUT inp[6];
SetInput(inp, VK_DOWN, 0, 3);
SetInput(inp+2, VK_CONTROL, VK_INSERT, 3);
::SendInput(2, inp, sizeof(INPUT));
::Sleep(200);
::SendInput(4, inp+2, sizeof(INPUT));
...
void SetInput(INPUT* toset, int first, int second, byte flags)
{
INPUT inp;
byte c=0;
inp.type = INPUT_KEYBOARD;
inp.ki.dwExtraInfo = 0;
inp.ki.time = 500;
inp.ki.wScan = 0;
if(flags&1!=0)
{
inp.ki.dwFlags = 0;
inp.ki.wVk = first;
toset[c++] = inp;
if(second != 0)
{
inp.ki.wVk = second;
toset[c++] = inp;
}
}
if(flags&2!=0)
{
inp.ki.dwFlags = KEYEVENTF_KEYUP;;
inp.ki.wVk = first;
toset[c++] = inp;
if(second != 0)
{
inp.ki.wVk = second;
toset[c++] = inp;
}
}
}
das code sollte "pfeil nach unten" DOWN, "pfeil nach unten" UP, "Ctrl" DOWN, "Einfg" DOWN, "Ctrl" UP, "Einfg" UP, zum activen fenster senden.
Hoffentlich hilft dir das )