1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| #include <iostream>
#include <stdio.h>
#include <windows.h>
#include <time.h>
using namespace std;
int main()
{
float x = 0;
float y = 0;
int time = 0;
printf ("Indiquez l'intervalle des clics : ", time);
scanf("%d", &time);
printf ("\n");
printf("Indiquez la position du clic en x :",x);
scanf("%f", &x);
printf("Indiquez la position du clic en y :",y);
scanf("%f", &y);
clock_t start, end;
double elapsed;
start = clock();
while(1==1)
{
end = clock();
elapsed = ((double)end - start) / CLOCKS_PER_SEC;
cout << elapsed << endl;
if (elapsed = time) mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);;
}
//mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
return 0;
} |
Partager