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 


[RLS] Mouse Coords Finder 1.4 - Added Active Window
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author 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 May 31, 2008 1:59 pm    Post subject: [RLS] Mouse Coords Finder 1.4 - Added Active Window Reply with quote

Mouse Coords Finder

Use

Useful when making macros.
For instruction on how to use it, refer to the read me that comes in the .zip, or below:
Quote:
Press F4 to bring up the message box. Then:
Press "Cancel" to go back to the main program, which will wait for F4 to be pressed.
Press "Try Again" to find the new mouse co-ordinates, active window and pixel colour.*
Press "Continue" to save the mouse co-ordinates, active window and pixel colour, and go back to the main program
*Try Again will be the default button, so you can either click it, or simply press enter.

Press Esc to close the program.

Mouse Co-ordinates, Active Window and Pixel Colour will be stored in MouseCoords.txt


When?
I thought of the idea this morning, and made it very quickly, it's not very complicated at all.

What?
It simply records mouse co-ordinates and the pixel colour at that specific point, and outputs them to a text file, at the touch of a button.

Comments/Suggestions/Coding Help are appreciated.
Attached is the binary, source, and read me.

UPDATED: Now with sleep(20); Wink
UPDATED 2: Now finds and saves pixel colour at the mouse co-ordinates!
UPDATED 3: Now saves active window!

_________________

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.


Last edited by --Pillboi-- on Thu Oct 23, 2008 2:13 pm; edited 4 times in total
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Sun Jun 01, 2008 3:44 am    Post subject: Reply with quote

Delphi
Code:
Var lol:TPoint;
Begin
GetCursorPos(lol);
Label1.Caption:= 'X: '+IntToStr(lol.X)+'Y: '+IntToStr(lol.y);
end;


Enter that code in a timer (interval 1), what's so hard?


Last edited by DeletedUser14087 on Sun Jun 01, 2008 11:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Sun Jun 01, 2008 6:08 am    Post subject: Reply with quote

Code:
    while(1){ //Loop until F4 is pressed.
        if(GetAsyncKeyState(VK_ESCAPE)) break; //If escape is pressed, break, and close program.
        if(GetAsyncKeyState(VK_F4)) CursorPos(); //Call CursorPos.
    }

    >>>



Wanna cook my cpu? lulz
Use a Sleep of at least 10~100 milliseconds in such a loop.

Delphi example:
Code:
Label.Caption:= 'X: '+IntToStr(Mouse.CursorPos.X)+'  Y: '+IntToStr(Mouse.CursorPos.Y);


Last edited by Reak on Sun Jun 01, 2008 7:44 am; edited 1 time in total
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: Sun Jun 01, 2008 6:16 am    Post subject: Reply with quote

Rot1 wrote:
Delphi
Enter that code in a timer (interval 1), what's so hard?

1. This is C.
2. I'm quite new to C.
3. I said it was simple.

Reawkon, good point... I should add some sleep... =)
Still, it's harder in C, as well as the stuff I said above.

Hey look, I got my first warning for ages. Fair enough though. For some reason, recently, I have become prone to spamming.

_________________

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
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Sun Jun 01, 2008 6:57 am    Post subject: Reply with quote

Oh, in C then we use this structer (Packed Record)

Code:
typedef struct tagPOINT {
  LONG x;
  LONG y;
} POINT, *PPOINT;


the code will look like this:

Code:
#include <stdio.h>
#include <windows.h>

int main(void)
{
   POINT lol;
   GetCursorPos(&lol);

   return printf("X:%d, Y:%d\n\n",lol.x,lol.y);
}
Back to top
View user's profile Send private message
thephoneguy
Grandmaster Cheater
Reputation: 1

Joined: 17 Mar 2007
Posts: 873

PostPosted: Sun Jun 01, 2008 7:33 am    Post subject: Reply with quote

Seriously kasp why are you constantly hating on people now? every time someone says anything you let them know how easy it would be. its starting to really annoy me man.
_________________
If you see me posting referring to an earlier conversation 9/10 times it was in the chatbox at baby Very Happy.
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: Sun Jun 01, 2008 7:55 am    Post subject: Reply with quote

Rot1 - Plus a message box with three options, yes.
Thanks phoneguy, it's probably because he's feeling self-conscious, so feels he must make others as well, and must prove himself. Probably also more than a hint of trying to be "pro". Unfortunately, he fails miserably at life.
He started flaming a lot, about a fortnight ago. So tell us Kasper, what happend to you 2 weeks ago?

_________________

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
Bizarro
I post too much
Reputation: 0

Joined: 01 May 2007
Posts: 2648

PostPosted: Sun Jun 01, 2008 8:16 am    Post subject: Reply with quote

pretty useful.
adding getpixel along with this would be even better Surprised

_________________

w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils
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: Sun Jun 01, 2008 8:31 am    Post subject: Reply with quote

Bizarro wrote:
pretty useful.
adding getpixel along with this would be even better Surprised

Good idea, I'll try to include that function when I have time. Smile Thanks for the idea.
At some point, I'm also going to test it with MapleStory, to see if the message box appears in front of it, and if not, try to make it so.
That was the original reason for making this, to ease the coding of bots, with something like ACTools, or even programming them.

_________________

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
Bizarro
I post too much
Reputation: 0

Joined: 01 May 2007
Posts: 2648

PostPosted: Sun Jun 01, 2008 8:37 am    Post subject: Reply with quote

for maplestory, i think u need to bypass getpixel the same way as other bot function
also u need to move your cursor away to get the original pixel. u might know them already, just throwing out ideas Razz

_________________

w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Sun Jun 01, 2008 9:28 am    Post subject: Reply with quote

ThePhoneGuy wrote:
Seriously kasp why are you constantly hating on people now? every time someone says anything you let them know how easy it would be. its starting to really annoy me man.


What are you talking about? what hate? i'm just giving here code snippets to see if he can learn anything new to add to his project.
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: Sun Jun 01, 2008 10:06 am    Post subject: Reply with quote

I do appreciate that. However, rhetorical and sarcastic questions: "what's so hard?", do suggest maliciousness.
Bizarro, I have added a getpixel function. However, I don't really want to make this into a hacking venture, so will probably not go into bypassing it for MS.

_________________

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
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Sun Jun 01, 2008 10:44 am    Post subject: Reply with quote

rEakW0n wrote:
Code:
    while(1){ //Loop until F4 is pressed.
        if(GetAsyncKeyState(VK_ESCAPE)) break; //If escape is pressed, break, and close program.
        if(GetAsyncKeyState(VK_F4)) CursorPos(); //Call CursorPos.
    }

    >>>



Wanna cook my cpu? lulz
Use a Sleep of at least 10~100 milliseconds in such a loop.

Delphi example:
Code:
Label.Caption:= 'X: '+IntToStr(Mouse.CursorPos.X)+'  Y: '+IntToStr(Mouse.CursorPos.Y);

Or RegisterHotKey.
Back to top
View user's profile Send private message
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Sun Jun 01, 2008 11:07 am    Post subject: Reply with quote

Bypassing the hook is really easy now. I'm pretty sure there's a postmessage+getpixel dll floating around somewhere where you can just call the function from it and it hops for you. But, if you didn't want to do that, someone could easily with your source if they wanted to.
Other than that, maybe add an option to take multiple clicks and output them to a file.

_________________
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: Sun Jun 01, 2008 11:26 am    Post subject: Reply with quote

So you mean, every click is recorded? I was thinking of something like that: If a mouse button was pressed while F4 was pressed, record that the mouse button was down. However, I like your idea, probably more.
How would I go about adding an option? I could have a console, but that looks ugly. I could make a whole GUI, but I don't know how, and can't be bothered. I could assign another key to toggle it on/off. Or, I could read options from a file, which might be the best way of going about it. Help me! Confused
I may use some hookhop dll to bypass it later, but for now, I'm not going to.

_________________

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.


Last edited by --Pillboi-- on Sun Jun 01, 2008 11:29 am; edited 1 time in total
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, 3  Next
Page 1 of 3

 
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