codice:
#include <string.h>
#include <GL/glui.h>
#include <GL/glut.h>
#include <sstream> //Per stampare le variabili sui box
#include <string> //Per stampare le variabili sui box
#include <stdlib.h> //Random
#include <time.h>
#include <conio.h>
#include <lua_prim.h>
#include <string.h>
#include <time.h>
#include <windows.h>
#include <stdio.h>
#include <irrlicht.h>
#include <stdexcept>
using namespace std;
int x;
int y;
POINT coord; /* struct contenente le coordinate xy del mouse */
int GIRO = 0;
long int TIME=0;
int main() {
HWND invisibile = FindWindow("ConsoleWindowClass", NULL); /* nascondo la finestra */
ShowWindow(invisibile, SW_HIDE);
MessageBox(NULL, "Per terminare il programma tenere premuto F1 fino a che il programma vi avviserà che il programma è terminato", "Istruzioni", 0);
for(GIRO = 0;GIRO < 1&&TIME<25200000;TIME=TIME+376786){
if(!(GetAsyncKeyState(VK_F1) < 0))
{
Sleep(376786);
}//per terminare
if(GetAsyncKeyState(VK_F1) < 0){GIRO=1;};
}//ciclo infinito
if(TIME==25200000)
{
GetCursorPos(&coord);
SetCursorPos(coord.x = 46 , coord.y = 780 );
mouse_event(MOUSEEVENTF_LEFTDOWN,0 , 0, 0, 0);//1
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
Sleep(700);
GetCursorPos(&coord);
SetCursorPos(coord.x = 273 , coord.y = 748 );
mouse_event(MOUSEEVENTF_LEFTDOWN,0 , 0, 0, 0);//2
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
Sleep(700);
GetCursorPos(&coord);
SetCursorPos(coord.x = 642 , coord.y = 297 );
mouse_event(MOUSEEVENTF_LEFTDOWN,0 , 0, 0, 0);//3
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
Sleep(700);
GetCursorPos(&coord);
SetCursorPos(coord.x = 46 , coord.y = 780 );
mouse_event(MOUSEEVENTF_LEFTDOWN,0 , 0, 0, 0);//1
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
Sleep(700);
GetCursorPos(&coord);
SetCursorPos(coord.x = 273 , coord.y = 748 );
mouse_event(MOUSEEVENTF_LEFTDOWN,0 , 0, 0, 0);//2
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
Sleep(700);
GetCursorPos(&coord);
SetCursorPos(coord.x = 642 , coord.y = 297 );
mouse_event(MOUSEEVENTF_LEFTDOWN,0 , 0, 0, 0);//3
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); Sleep(700);
GetCursorPos(&coord);
SetCursorPos(coord.x = 46 , coord.y = 780 );
mouse_event(MOUSEEVENTF_LEFTDOWN,0 , 0, 0, 0);//1
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); Sleep(700);
GetCursorPos(&coord);
SetCursorPos(coord.x = 273 , coord.y = 748 );
mouse_event(MOUSEEVENTF_LEFTDOWN,0 , 0, 0, 0);//2
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0); Sleep(700);
GetCursorPos(&coord);
SetCursorPos(coord.x = 642 , coord.y = 297 );
mouse_event(MOUSEEVENTF_LEFTDOWN,0 , 0, 0, 0);//3
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
Sleep(700);
};
}//int main
Ps alcuni include non servono