Skip to content

Instantly share code, notes, and snippets.

@daramkun
Created March 4, 2014 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daramkun/9346428 to your computer and use it in GitHub Desktop.
Save daramkun/9346428 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <Windows.h>
int main(void)
{
bool start = false;
int c = 0;
char str[32] = {0, };
bool exit = true;
while(exit)
{
while(start)
{
if(GetAsyncKeyState(VK_F7) & 0x8000)
start = false;
Sleep(150);
itoa(c, str, 10);
printf("%s\n", str);
for(int i = 0; i < strlen(str); i++)
{
keybd_event((VK_NUMPAD0 + (BYTE)(str[i] - '0')), 0, 0, 0);
keybd_event((VK_NUMPAD0 + (BYTE)(str[i] - '0')), 0, 2, 0);
}
if(GetAsyncKeyState(VK_F7) & 0x8000)
start = false;
printf("Please Wait...\n");
Sleep(150);
keybd_event(VK_RETURN, 0, 0, 0);
keybd_event(VK_RETURN, 0, 2, 0);
keybd_event(VK_BACK, 0, 0, 0);
keybd_event(VK_BACK, 0, 2, 0);
if(c >= 100000)
exit = false;
if(GetAsyncKeyState(VK_F7) & 0x8000)
start = false;
c++;
}
if(!exit) break;
if(GetAsyncKeyState(VK_F2) & 0x8000)
start = true;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment