中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-04 06:49
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » [Help] [NT] How can I distinguish different mouse cursor shapes in a game? Using API functions
Printable Version  897 / 1
Floor1 yanghongquan Posted 2007-04-18 22:43
新手上路 Posts 2 Credits 8
I'd like to ask everyone for some advice.

I'm learning to write a script with AutoIt, and I want to tell apart the different mouse cursor shapes in a game. Games all have their own mouse cursor files. When the mouse is moved onto a monster, it has one shape; when it's placed on an NPC, it changes to another shape. What I want is that while the script is running, different values can be assigned to a variable according to different cursor shapes. For example, in the first case, when fighting monsters, it gets CursorID=1; in the second case, when talking to an NPC, it gets CursorID=2. That way, the corresponding statements can be run according to different values.

AutoIt does have MouseGetCursor(), which can recognize 16 kinds of mouse cursor shapes, but only system ones. For non-system ones such as those in games, it can't do it. Why is there no function for recognizing non-system mouse cursors? I don't understand programming, so this question may be pretty newbie-level, but I really hope some expert who knows can clear this up for me.

It seems everyone recommends using screenshot software. Is there no other way? My hardware specs are low, so it'd be best not to rely on third-party software. Can this be done with API functions? Or by modifying the registry, because when a game is installed, it always adds some things to the registry, right? So maybe some cursor information gets added too? Change that a bit, and maybe it'll work? I'm just guessing. Or would VBS work? Anyway, if there's any good method, please teach me.

Also, if there is a way to do it, please explain it in as much detail as possible, because I'm pretty newbie-level. I'm not very familiar with VBS, API, the registry, and so on.

And one more question: a script can read the color of pixels on the screen, but not the mouse cursor, while screenshot software can capture the cursor shape. What's the principle behind that?
Floor2 everest79 Posted 2007-04-19 09:59
金牌会员 Posts 1,127 Credits 2,564
VBS can handle this kind of function. If you're interested, you can look online for the latest version of Key Wizard; it comes with tutorials, including visual recognition.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023