View previous topic :: View next topic |
Author |
Message |
Varreon Advanced Cheater
Reputation: 0
Joined: 13 Jun 2007 Posts: 80
|
Posted: Sun Jul 08, 2007 4:54 pm Post subject: C++/WinAPI equivalent to PixelGetColor |
|
|
Ive decided to make a macro which finds a color and clicks it. I have previously been very sucessfull at autoclickers, but I am having troubling finding a Windows API equivalent to the autohotkey function:
PixelGetColor():
Retrieves the color of the pixel at the specified x,y screen coordinates.
Any Help appreciated!
_________________
|
|
Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Jul 08, 2007 4:55 pm Post subject: |
|
|
GetPixel
|
|
Back to top |
|
 |
Varreon Advanced Cheater
Reputation: 0
Joined: 13 Jun 2007 Posts: 80
|
Posted: Sun Jul 08, 2007 5:15 pm Post subject: |
|
|
Wow... I can see the resemblance. How do i get a handle to the device? or can i just ignore that argument?
_________________
|
|
Back to top |
|
 |
appalsap Moderator
Reputation: 0
Joined: 27 Apr 2006 Posts: 6753 Location: Pakistan
|
Posted: Sun Jul 08, 2007 5:21 pm Post subject: |
|
|
GetDC
|
|
Back to top |
|
 |
UnLmtD Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 894 Location: Canada
|
Posted: Sun Jul 08, 2007 5:22 pm Post subject: |
|
|
Edited... -_-" beated me to it
_________________
|
|
Back to top |
|
 |
Varreon Advanced Cheater
Reputation: 0
Joined: 13 Jun 2007 Posts: 80
|
Posted: Sun Jul 08, 2007 5:31 pm Post subject: |
|
|
Thanks guys!
Edit:
Ok, Ive got another issue. While trying to get the window handle, i get failures. Heres my code snippet:
void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
process = FindWindow(NULL,Edit1->Text.c_str());
if (process ==NULL){
ShowMessage("Error");
}
else{
ShowMessage("Success");
}
}
Edit1->Text is the exe name (for example, firefox.exe), but i always get "Erro
_________________
|
|
Back to top |
|
 |
DeltaFlyer Grandmaster Cheater
Reputation: 0
Joined: 22 Jul 2006 Posts: 666
|
Posted: Sun Jul 08, 2007 7:15 pm Post subject: |
|
|
The documentation of FindWindow clearly states that the second parameter is the title of the window, not the name of the exe. So instead of "firefox.exe", type in the name of the window that you see in your task bar.
_________________
Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for? |
|
Back to top |
|
 |
Varreon Advanced Cheater
Reputation: 0
Joined: 13 Jun 2007 Posts: 80
|
Posted: Sun Jul 08, 2007 7:48 pm Post subject: |
|
|
Thanks! I'll try that.
_________________
|
|
Back to top |
|
 |
|