06/30/2009, 13:21
|
#16
|
elite*gold: 46
Join Date: Mar 2006
Posts: 2,589
Received Thanks: 1,198
|
Quote:
Originally Posted by floxy2
Code:
#include <stdio.h>
#include <iostream>
#include <windows.h>
#define TEAM1 RGB(255,255,0)
#define TEAM2 RGB(0,0,255)
void main()
{
bool on, color; // On durch F7 an/aus schaltbar || color durch F6 umschaltbar
HDC hdc = GetDC(HWND_DESKTOP); //Bildschirm Handle
COLORREF Pixel; //Pixel Daten
int bx = GetSystemMetrics(SM_CXSCREEN); //Alternativ die Werte einfach auf Höhe*Breite des Fensters setzen.
int by = GetSystemMetrics(SM_CYSCREEN);
while(1)
{
if(GetAsyncKeyState(VK_F7)& 1)
{
on = !on;
}
if(GetAsyncKeyState(VK_F6)& 1)
{
color = !color;
}
if(on == true)
{
for(int y=1;y<by;y+=10)
{
for(int x=1;x<bx;x+=10)
{
Pixel = GetPixel(hdc, x, y);
if(color == true)
{
if(Pixel==TEAM1)
{
SetCursorPos(x,y);
}
}
if(color == false)
{
if(Pixel==TEAM2)
{
SetCursorPos(x,y);
}
}
}
}
}
Sleep(50); //Sonst Lagg
}
}
Mal bisschen Verschönert, sollte jetzt einfach zu verstehen sein.
|
Ist es auch . Könnte jetzt geclosed werden alles was gesagt werden musste wurde gesagt.
|
|
|