Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 04:24

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[C++] Pixel Suchen aber wie? mit GetPixel()?

Discussion on [C++] Pixel Suchen aber wie? mit GetPixel()? within the C/C++ forum part of the Coders Den category.

Reply
 
Old 06/30/2009, 13:21   #16
 
syntex's Avatar
 
elite*gold: 46
Join Date: Mar 2006
Posts: 2,589
Received Thanks: 1,198
Quote:
Originally Posted by floxy2 View Post
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.
syntex is offline  
Old 07/07/2009, 18:31   #17
 
neofox's Avatar
 
elite*gold: 0
Join Date: Oct 2007
Posts: 88
Received Thanks: 2
Ja ich Danke allen nochmal könnte gerne Closed ist alles erklärt wurden ^^
neofox is offline  
Reply


Similar Threads Similar Threads
Bug suchen, aber wie ?
03/24/2010 - Metin2 - 29 Replies
Hallo suche ein ganz bestimmten Bug, aber wie ? Irgendwie ist alles verboten, also meine Frage an wen kann ich mich wenden ? Danke voraus!
[C++] GetPixel gibt falsche Werte zurück
10/15/2009 - C/C++ - 26 Replies
Hi Leute ^^ Ich hab heute mal versucht für Combat Arms einen kleinen "Aimbot" (eig kann mans so nicht nennen) zu schreiben, der jedes mal wenn jemand durch mein Fadenkreuz läuft schießt. Dafür muss ich natürlich still stehen und darf die Waffe nicht bewgen. Soweit, sogut. Jetzt kommen wir zu meinem Problem: Sobald ich jedoch ingame gehe (also sobald die 3D Engine von CA läuft (im Menü gehts noch)), gibt GetPixel immer den selben Wert zurück, welcher jedoch in keinster Weise passt. Bei...
GetPixel Download?
08/14/2007 - Main - 3 Replies
So...ich hab keine Ahnung, ob das hier richtig ist (und wenn nicht, dann verscheibt es bitte), aber ich wollte mal fragen wo man GetPixel runterladen kann? Ich hab jetz ca. 30 Minuten gegoogelt, aber nix gefunden, Danke shconmal im Voraus ;)



All times are GMT +1. The time now is 04:25.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.