|
-
Aug 13th, 2007, 11:25 AM
#1
Thread Starter
Lively Member
How do I Get the Coordinates of a Window?
Ok, what I was wanting to do, was make a simple program that automatically plays an online game for you that was written in Java. Ive gotten everything working but, is there a way to detect the coordinates of it. What I want to do, is create some function that will assign the coordinates to the variables x and y. Then, when it moves the mouse, clicks, or whatever, the commands would be like Movemouse(x+5, y+15). I want it to base all the coordinates off of where the applet is located.
I could probobly do that with getting the handles and stuff(not very good with window handles and stuff, dont have any expericene with them, would have to read up a bit) , but it would be lots of work. The game is a MMORPG. Some people make like clients for in in VB6, and other languages. It is played in all different windows and things. I was wondering, so to locate it in any of the windows, is there like a way to list all the child windows, and determine which one is the game, then get coordinates??
I was wondering if any of you could help me, or point me in the right direction.
EDIT: I realized I can get the parent window with the GetForegroundWindow. Is there a function like that, but it returns the child window if one is selected? Like, if you were browsing in internet explorer, that would be one handle. And if you started playing a game or something through IE, and the game was the focus, it would register a different handle.
Thanks,
The Rogue
Last edited by The Rogue; Aug 13th, 2007 at 01:00 PM.
-
Aug 13th, 2007, 11:28 AM
#2
Re: How do I Get the Coordinates of a Window?
Try searching forum for GetWindowRect - there are many samples posted.
Welocome to Forums, btw!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|