[Need Help] C++: Colour Clicker

Discussion in 'Programming General' started by tofurocks, Nov 29, 2008.

[Need Help] C++: Colour Clicker
  1. Unread #1 - Nov 29, 2008 at 1:02 PM
  2. tofurocks
    Joined:
    Nov 8, 2008
    Posts:
    2,344
    Referrals:
    2
    Sythe Gold:
    0

    tofurocks Iloveroy

    [Need Help] C++: Colour Clicker

    I can't find a way to move the move over a specific colour or pixel in C++. I know the language fairly well, I'm still a bit of a beginner, I've been using
    setcursorpos() for some things but it's useless for cheating on games where the objects move (counter-strike aimbot, monster clicker, etc.) Anyone know how I can make a better clicker?
     
  3. Unread #2 - Nov 29, 2008 at 2:14 PM
  4. Govind
    Joined:
    Apr 22, 2005
    Posts:
    7,825
    Referrals:
    13
    Sythe Gold:
    23
    Prove it! Trole Tier 1 Prizebox Tortoise Penis Le Monkey UWotM8? Wait, do you not have an Archer rank? Potamus

    Govind The One Musketeer
    Mudkips Highly Respected Retired Administrator

    [Need Help] C++: Colour Clicker

    Code:
    bool FindColor(long color, int XS, int YS, int XF, int YF)
    {
    	HDC dc1;
    	int x,y;
    	//bool found = false;
    	dc1 = GetDC(NULL);
    	for(y = YS; y < YF; y++){
    		for(x = XS; x < XF; x++){
    			if(GetPixel(dc1,x,y)==color){
    				SetCursorPos(x,y);
    				return true;
    			}
    		}
    	}
    	return false;
    }
    Be warned, though, this method is very slow.
     
  5. Unread #3 - Nov 29, 2008 at 2:30 PM
  6. tofurocks
    Joined:
    Nov 8, 2008
    Posts:
    2,344
    Referrals:
    2
    Sythe Gold:
    0

    tofurocks Iloveroy

    [Need Help] C++: Colour Clicker

    Cool, thanks! That's gonna help me a ton. How slow is it :/
     
< Youtube Downloader | What language? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site