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 


I need a way to view the mouse position.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Hokurai
Advanced Cheater
Reputation: 0

Joined: 18 Sep 2008
Posts: 95

PostPosted: Sun Nov 16, 2008 8:27 pm    Post subject: I need a way to view the mouse position. Reply with quote

I'm trying to make a bot for a game to click on certain places on the game so I need a program or something that will let me view the position of the mouse. Also, I wasn't sure where to put this thread so sorry if this is the wrong place.
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Sun Nov 16, 2008 8:28 pm    Post subject: Reply with quote

GetCursorPos();
_________________
Back to top
View user's profile Send private message Send e-mail
Hokurai
Advanced Cheater
Reputation: 0

Joined: 18 Sep 2008
Posts: 95

PostPosted: Mon Nov 17, 2008 12:04 am    Post subject: Reply with quote

And how would I use that? xD I'm making the bot using AutoHotkey. o.o
Back to top
View user's profile Send private message
sloppy
Expert Cheater
Reputation: 0

Joined: 17 Aug 2008
Posts: 123

PostPosted: Mon Nov 17, 2008 12:24 am    Post subject: Reply with quote

Use some common sense?.. Search? Read? Learn?
http://www.autohotkey.com/docs/commands/MouseGetPos.htm
Back to top
View user's profile Send private message
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Mon Nov 17, 2008 3:30 am    Post subject: Reply with quote

You would find it easier to understand Autoit.

Also, remember to check the help files, it saves you looking stupid
Back to top
View user's profile Send private message
Hokurai
Advanced Cheater
Reputation: 0

Joined: 18 Sep 2008
Posts: 95

PostPosted: Mon Nov 17, 2008 2:45 pm    Post subject: Reply with quote

I forgot about the help files. o.o
Back to top
View user's profile Send private message
blackmorpheus
Expert Cheater
Reputation: 0

Joined: 05 Apr 2008
Posts: 159

PostPosted: Mon Nov 17, 2008 4:50 pm    Post subject: Reply with quote

in C++ u can use:

Code:

POINT pos;
GetCursorPos(&pos);
int Xcoord = pos.x;
int Ycoord = pos.y;

and you can do whatever u want with X and Y..

Also if u want to get the real coordinates,

HWND hWnd = FindWindow(NULL, T"name of window");
ScreenToClient(hWnd, &pos);
Back to top
View user's profile Send private message
Hokurai
Advanced Cheater
Reputation: 0

Joined: 18 Sep 2008
Posts: 95

PostPosted: Mon Nov 17, 2008 8:00 pm    Post subject: Reply with quote

I just realized that autohotkey has a thing built in called window spy that says the mouse position and window name the mouse is over. Embarassed
Back to top
View user's profile Send private message
SXGuy
I post too much
Reputation: 0

Joined: 19 Sep 2006
Posts: 3551

PostPosted: Tue Nov 18, 2008 3:48 am    Post subject: Reply with quote

yes it does, so does Autoit, Window Info Tool Razz

Does alot more than that tho, can also tell you the window name, object handle, pixel color etc.

All works by using the same functions included in both programs GetPixel, GetMousePos, WinGetHandle.
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
Page 1 of 1

 
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