When I run this script, it works great if I open notepad. It will spam 33333...
But when I try it on kal, it just won't send any input.
I tried 0x04, but I figured it's either right click or middle click on mouse. Can't find codes for numbers to work in kal.
Any ideas?
Code:
#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
#define WINVER 0x0500
#include <windows.h>
int main()
{
int a=1;
// This structure will be used to create the keyboard
// input event.
INPUT ip;
// Pause for 5 seconds.
do {
Sleep(3000);
// Set up a generic keyboard event.
ip.type = INPUT_KEYBOARD;
ip.ki.wScan = 0; // hardware scan code for key
ip.ki.time = 0;
ip.ki.dwExtraInfo = 0;
// Press the "A" key
ip.ki.wVk = 0x33; // virtual-key code for the "3" key
ip.ki.dwFlags = 0; // 0 for key press
SendInput(1, &ip, sizeof(INPUT));
Sleep(500);
// Release the "3" key
ip.ki.dwFlags = KEYEVENTF_KEYUP; // KEYEVENTF_KEYUP for key release
SendInput(1, &ip, sizeof(INPUT));
a++;
}
while (a>0);
// Exit normally
return 0;
}






