Results 1 to 7 of 7
  1. #1
    larta's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    In your Back !!
    Posts
    323
    Reputation
    10
    Thanks
    69
    My Mood
    Cool

    [Need Help]Get the screen resolution

    Hi

    I got a little problem : I can't have the screen resolution.
    I think what i'm doing can work, but wr crash.
    I tried to use GetDeviceCaps() and GetSystemMetrics() but wr crash.

    How to figure it out ?
    Do I need detour ? Because I think Hackshield hook this functions.

    See my code :
    Code:
    void CheckScreen()
    {
    	if (GetAsyncKeyState(VK_F5))
    	{
    	hDC = GetDC(NULL);
    	//ScreenX = GetSystemMetrics(SM_CXSCREEN) ;
    	//ScreenY = GetSystemMetrics(SM_CYSCREEN);
    	ScreenX = ScreenX / 2;
    	ScreenY = ScreenY / 2 - 22;
    	int tmp = ScreenX;
    	MessageBox(0, (LPSTR)tmp, "Infos", MB_OK); // Just to be sure of the value
    	}
    }
    You have any idea to get these infos ? I hope i'm wrong about HS ..

    EDIT : Sorry, i got it.

    It was because of the MessageBox function.
    Last edited by larta; 11-28-2010 at 07:45 AM.

  2. #2
    TheCamels8's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    Israel :D
    Posts
    2,945
    Reputation
    174
    Thanks
    1,376
    My Mood
    Cheeky
    So your problem solved?

  3. #3
    larta's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    In your Back !!
    Posts
    323
    Reputation
    10
    Thanks
    69
    My Mood
    Cool
    No ^^

    My main problem is another one :
    Make a Aimbot. I think i'm in good way.
    I check the color of a pixel of the crosshair, and if it is red ( not really ), It send a right click.

    But i have a problem :
    It doesn't work.
    Nothing happend. Just my CPU is becoming overloaded... And wr lagg.

  4. #4
    xTremist's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    107
    Reputation
    10
    Thanks
    16
    My Mood
    Bored
    That wouldn't be an aimbot, that would be a triggerbot?
    Simple WarRock NoMenu Base:
    Update the addresses yourself.

  5. #5
    termica's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    norway
    Posts
    400
    Reputation
    26
    Thanks
    85
    My Mood
    Sneaky
    Quote Originally Posted by larta View Post
    No ^^

    My main problem is another one :
    Make a Aimbot. I think i'm in good way.
    I check the color of a pixel of the crosshair, and if it is red ( not really ), It send a right click.

    But i have a problem :
    It doesn't work.
    Nothing happend. Just my CPU is becoming overloaded... And wr lagg.
    1. by making it look for the pixel it will be a triggerbot
    2. you need to make it to left click or it wont work /
    bbbboooored

  6. #6
    larta's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    In your Back !!
    Posts
    323
    Reputation
    10
    Thanks
    69
    My Mood
    Cool
    Yeah sorry, i little mistake, triggerbot, right ^^

    I made it left click. ( Another mistake in my prev post xD Sorry )
    But hmm nothing seems happen.

    Here's my code :
    Code:
    {
    INPUT structure;
    structure.type = 0;
    structure.mi.dwFlags = MOUSEEVENTF_LEFTDOWN, MOUSEEVENTF_LEFTUP;
    structure.mi.time = 100;
    color = GetPixel(hDC, ScreenX, ScreenY);
    if (color == 0x2555151) //( RGB : 255, 51, 51)
    	SendInput(1, &structure, sizeof(structure));
    }
    This is supposed to work.
    ScreenX and ScreenY are the value of the wanted pixel, found in that way :
    Code:
    void CheckScreen()
    {
    	if (GetAsyncKeyState(VK_F5))
    	{
    	hDC = GetDC(NULL);
    	ScreenX = GetSystemMetrics(SM_CXSCREEN) ;
    	ScreenY = GetSystemMetrics(SM_CYSCREEN);
    	ScreenX = ScreenX / 2;
    	ScreenY = ScreenY / 2 - 22;
    	}
    }
    Here, nothing happen.

  7. #7
    larta's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    In your Back !!
    Posts
    323
    Reputation
    10
    Thanks
    69
    My Mood
    Cool
    Little push up ( no spam ! :P )