mi aplicaion es la sigiente. el problema que tengo es que tengo que entrar a la
consola para ejecutar las opciones, lo que quiero es minimizar la aplicacion y
digamso precionar 'F8' y que la aplicacion ejecute la opcion 1.
Código
#include <stdio.h> #include <stdlib.h> #include <windows.h> using namespace std; int main() { int fin = 0; int opcion; while (fin == 0) { switch(opcion) { case 1: for(signed int i = 10; i >= 0; i--) { Sleep(1000); } while(1 && !GetAsyncKeyState(VK_F8)){ mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0); Sleep(20); mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0); Sleep(20); } break; case 2: for(signed int i = 10; i >= 0; i--) { Sleep(1000); } while(1 && !GetAsyncKeyState(VK_F9)){ mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0); Sleep(20); mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0); Sleep(20); } break; case 3: fin = 1; break; default: fin = 0; break; } } return 0; }