Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How would I use getpixel in fullscreen maple?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sat Oct 25, 2008 9:01 am    Post subject: How would I use getpixel in fullscreen maple? Reply with quote

So How would I do it?
If I use Bypassed GetPixel() in window mode it works but in full screen it dsoesn't...
Back to top
View user's profile Send private message
TraxMate
Master Cheater
Reputation: 0

Joined: 01 Mar 2008
Posts: 363

PostPosted: Sat Oct 25, 2008 9:09 am    Post subject: Reply with quote

I wondering the same thing. But I havn't got it to work in windowed mdoe yet. Could you tell how you did? Smile
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sat Oct 25, 2008 9:11 am    Post subject: Reply with quote

Trampoline over the 5-Bytes that GG Patches with a jump.
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sat Oct 25, 2008 9:14 am    Post subject: Reply with quote

oh lawl my bad

I think it's because in full screen it stretches an 800x600 image to fit a full moniter. You might have to adjust how you use the function. So say i have a red pixel at 600,18 Would you have to adjust to the screen size or can you use 600,18?

_________________


Last edited by HomerSexual on Sat Oct 25, 2008 9:32 am; edited 1 time in total
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sat Oct 25, 2008 9:15 am    Post subject: Reply with quote

hmm.. But Im getting the pixel at my mouse. so My mouse would be in the 800 by 600 range.
Back to top
View user's profile Send private message
TraxMate
Master Cheater
Reputation: 0

Joined: 01 Mar 2008
Posts: 363

PostPosted: Sat Oct 25, 2008 9:41 am    Post subject: Reply with quote

dnsi0 wrote:
Trampoline over the 5-Bytes that GG Patches with a jump.
I know how to bypass GetPixel but not how to use it.

dnsi0 wrote:
hmm.. But Im getting the pixel at my mouse. so My mouse would be in the 800 by 600 range.
Are you getting the pixel while in fullscreen?
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Sat Oct 25, 2008 9:55 am    Post subject: Reply with quote

Quote:
I think it's because in full screen it stretches an 800x600 image to fit a full moniter. You might have to adjust how you use the function. So say i have a red pixel at 600,18 Would you have to adjust to the screen size or can you use 600,18?


GetPixel requires a handle to the window, so all the co-ordiantes are relative to the window

i dont know why it wont work fullscreen, but if you dont post the source i doubt anyone can help

im failry sure my way, which i use in snootae bot worked in full screen

Edit: ooh, also, are you getting the pixel at the exact mouse x and y positions? i might have a solution

_________________
Back to top
View user's profile Send private message
--Pillboi--
Grandmaster Cheater Supreme
Reputation: 0

Joined: 06 Mar 2007
Posts: 1383
Location: I don't understand the question. Is this a 1 to 10 thing?

PostPosted: Sat Oct 25, 2008 11:39 am    Post subject: Reply with quote

Snootae wrote:
ooh, also, are you getting the pixel at the exact mouse x and y positions? i might have a solution

You mean move the mouse? Razz
A better question would be, what value does it return in full screen?
Always the same colour? A wrong RGB value? CLR_INVALID?

_________________

Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair.
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Sat Oct 25, 2008 11:44 am    Post subject: Reply with quote

i was gonna say if it keeps update the pixel at the position of the mouse, it wont work because the 0,0 pixel is actually part of the mouse image's black outline

and yeh, your questions are most generally helpful, but i dont much care for helping really

_________________
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sat Oct 25, 2008 12:29 pm    Post subject: Reply with quote

Thanks Ill try that. And how to use???

Full screen: GetPixel(GetDC(0),x,y)
Screen: GetPixel(GetDC(yourfckinghwnd),x,y)

there ya go.
Back to top
View user's profile Send private message
TraxMate
Master Cheater
Reputation: 0

Joined: 01 Mar 2008
Posts: 363

PostPosted: Sat Oct 25, 2008 1:16 pm    Post subject: Reply with quote

Does anyone know what's wrong with this code?
Code:
void Test(int x, int y, int r, int g, int b)
{
   BYTE R = GetRValue(r), G = GetGValue(g), B = GetBValue(b);
   char Message [50];
   if(GetPixel(GetDC(NULL), x, y) == (R | G | B))
   {
      sprintf_s(Message, "RGB you choosed : %d, %d, %d", R, G, B);
      MessageBoxA(NULL, Message, "Message", MB_OK);
   }
   else
      cout << "Error" << endl;
}
When I call the function it works sometimes and sometimes not :S.

I post it here cuz I think it's not necessary to make a new topic about getpixel..
Back to top
View user's profile Send private message
--Pillboi--
Grandmaster Cheater Supreme
Reputation: 0

Joined: 06 Mar 2007
Posts: 1383
Location: I don't understand the question. Is this a 1 to 10 thing?

PostPosted: Sat Oct 25, 2008 1:27 pm    Post subject: Reply with quote

I don't know if this is the only problem, but for GetRValue, GetGValue and GetBValue, they require the full rgb colour. However, seeing as you've already been supplied with the rgb values, I don't know why you're trying to retrieve them.
On top of that, you can just compare the COLOUR structures without separating them into parts. Wink
Also, I can't explain why, but I don't think your if statement will work... Confused

_________________

Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair.
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sat Oct 25, 2008 1:52 pm    Post subject: Reply with quote

TraxMate wrote:
Does anyone know what's wrong with this code?
Code:
void Test(int x, int y, int r, int g, int b)
{
   BYTE R = GetRValue(r), G = GetGValue(g), B = GetBValue(b);
   char Message [50];
   if(GetPixel(GetDC(NULL), x, y) == (R | G | B))
   {
      sprintf_s(Message, "RGB you choosed : %d, %d, %d", R, G, B);
      MessageBoxA(NULL, Message, "Message", MB_OK);
   }
   else
      cout << "Error" << endl;
}
When I call the function it works sometimes and sometimes not :S.

I post it here cuz I think it's not necessary to make a new topic about getpixel..


according to this the only time your if will hold true is if x,y is in the exact same point with the exact same color every time

_________________
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sat Oct 25, 2008 1:59 pm    Post subject: Reply with quote

Yea it does work. Its getting maple's pointer's black line. Lol...
Back to top
View user's profile Send private message
--Pillboi--
Grandmaster Cheater Supreme
Reputation: 0

Joined: 06 Mar 2007
Posts: 1383
Location: I don't understand the question. Is this a 1 to 10 thing?

PostPosted: Sat Oct 25, 2008 2:01 pm    Post subject: Reply with quote

Glad it works. Rolling Eyes
_________________

Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites