Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
extra
- Newbie
- Posts: 3
- Joined: Wed Jun 25, 2008 4:10 pm
Post
by extra » Wed Jun 25, 2008 4:40 pm
Hi all,
Im writing a script for a game, and I want to get the mouse coords in a certain game option. To do this im using getcursorpos, but the script always gives me the same coords: 320, 200. Always.
I wrote the following script:
Code: Select all
GetCursorPos>X,Y
Message>Current Position : %X%,%Y%
Anyone can help me with this? thanks.
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Wed Jun 25, 2008 5:23 pm
Game cursors are sometimes NOT the real cursor. Games need to work at a lower level so the cursor you see is probably custom built and not related in any way to the Windows cursor. So GetCursorPos won't retrieve the position of the game cursor. I suspect this is the issue here, although I could be wrong.
-
extra
- Newbie
- Posts: 3
- Joined: Wed Jun 25, 2008 4:10 pm
Post
by extra » Wed Jun 25, 2008 10:27 pm
hm yes it looks like thats the problem.. Altough I can make the mouse move with:
Isn't any other way to get the mouse coords?
Thanks for replying.
offtopic: this program is really good, been using it for a long time.
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Thu Jun 26, 2008 4:33 am
If the game cursor is actually just a regular graphic then you could use FindImagePos. This won't work for true cursors.