1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#include <iostream>
#include <cstdlib>
#include <Windows.h>
#using <mscorlib.dll>
using namespace std;
using namespace System;
void click(int x, int y)
{
SetCursorPos(x, y);
Sleep(50);
mouse_event(MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, x, y, 0, 0);
}
int main()
{
click(1451, 13); //minimize
//click(813, 373); //main app
//click(834, 514); //center
click(762, 455); //start
// Get the color of a pixel within myBitmap.
Color pixelColor = myBitmap->GetPixel(50, 50);
}
|