Jump to content
Sign in to follow this  
redcrusher

CUSOR ID'S

Recommended Posts

redcrusher

How do i distinguish betwene 2 "Unknown" ID'S?

I REALLY REALLY REALLY need to!!!

anyideas?

--redcrusher

Share this post


Link to post
Share on other sites
The Kandie Man

See MouseGetCursor() in the help file for more information. But basically the following numbers are the ID's

0 = UNKNOWN (this includes pointing and grabbing hand icons)

1 = APPSTARTING

2 = ARROW

3 = CROSS

4 = HELP

5 = IBEAM

6 = ICON

7 = NO

8 = SIZE

9 = SIZEALL

10 = SIZENESW

11 = SIZENS

12 = SIZENWSE

13 = SIZEWE

14 = UPARROW

15 = WAIT


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites
redcrusher

betwene 2 "Unknown" ID'S?

if you read what i typed...

--redcrusher

Share this post


Link to post
Share on other sites
The Kandie Man

Sorry, read the post to quickly and didn't realize you were talking exclusively about unknown cursor ID's.

There are no functions in autoit that can determine an unknown cursor ID. The only cursor ID's that aren't available would be the hand ones and i would simply suggest that you not use those. If you are using custom cursors you have made, the script will work. You simply have to set the appropriate cursor to the appropriate place in the mouse properties. The ID's should therefore work even on computers where the user has selected a custom pointer, or a custom hourglass, etc.


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites
redcrusher

But, these are 2 cursors in a game...

how do i set those?

the only way i can think of doing this, is to use the pixle search, but it does not include the cursor in the search... if just takes everything that is behind the cursor... if there was a way to set it so it searched the cursor pixles too, then that would be amazing.

--redcrusher

Edited by redcrusher

Share this post


Link to post
Share on other sites
Thatsgreat2345

im guessing ur trying to make a bot that when u go over a monster and the cursor changes to like the sword or whatever the attack is u want it to click am i wrong?

Share this post


Link to post
Share on other sites
redcrusher

im guessing ur trying to make a bot that when u go over a monster and the cursor changes to like the sword or whatever the attack is u want it to click am i wrong?

exactly!!!

arethere any examples or anything you know of?

--redcrsuher

Share this post


Link to post
Share on other sites
redcrusher

Come on guys!!! i really need this!!!

--redcrusher

Share this post


Link to post
Share on other sites
Fur

you can get the cursorid easily enough. from that there is a windows call that you can use to get the graphic data used by that cursor. you can peek at a few pixels in that to tell which cursor it is. unfortunately, i'm at work and my sample code is at home..

Share this post


Link to post
Share on other sites
redcrusher

you can get the cursorid easily enough. from that there is a windows call that you can use to get the graphic data used by that cursor. you can peek at a few pixels in that to tell which cursor it is. unfortunately, i'm at work and my sample code is at home..

Please if you could post that code i would love it!!!

thanks!!!

-redcrusher

Share this post


Link to post
Share on other sites
Fur

Hmm, well I can't paste the C++ copyrighted code here, but I can tell you what it's doing!

First call GetCursorInfo(&ci); to find the cursor.

Next call GetIconInfo(ci.hCursor, &ii); to get the handle to the icon for it.

Finally, create a DC, select the icon into the DC, and you can call GetPixel() on the DC to retrieve pixels values. From there you should be able to determine which is which!

Good luck!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.