|
-
Aug 2nd, 2010, 04:40 AM
#1
Thread Starter
Member
How to make your own second cursor.
I appreciate all the help i get on this forum everytime!.
I got an issue again, Im using a program which automatically does the work I normally have to do, but it uses my mouse to click on a java application. Normally I would have to do it myself but now the program does it.
I was wondering wether there was a way to create a second mouse cursor, to not interrupt the main mouse cursor, so I could do other work while my program is still doing its work. Like 2 mouses, 1 is the main cursor, the other one is programmed to do its work even if the form is not focused.
Or if this wouldnt be possible, is there a way to let my form click on certain places on itself without it being focused. E.g. my form is not focused but the proces still goes on, there is still being clicked on it.
Thanks in advance. I have seen this happening before but now I wanna do it myself.
-
Aug 2nd, 2010, 05:30 AM
#2
Re: How to make your own second cursor.
Well, no not really. The system can only have one true cursor but you can simulate mouse movements and clicks by sending the correct messages to the window you want to click on (with "window" here I'm talking about any kind of window, a button or a listbox is considered to be windows as well as the main forms). Since this is a Java application I'm not 100% sure if it will work in the same manner but you could use a tool like Spy++ to see what kind of messages that are sent when you click on the various parts that makes up the application and then send messages like WM_MOUSEDOWN/WM_MOUSEUP to them.
-
Aug 2nd, 2010, 05:56 AM
#3
Re: How to make your own second cursor.
There are api calls to move the mouse and click at certain positions. You could save the current position, move the mouse and click, then move back again. Assuming its quick enough the speed would mean that your cursor would 'jerk' about the place when you use it while the clicking takes place. It may not work well at all, suck it and see I guess. The mouse move click stuff has been covered loads of times, theres even an api faq
-
Aug 2nd, 2010, 08:47 AM
#4
Re: How to make your own second cursor.
Some good ideas I see. Here's a different approach, whether useful, you have to decide. Can you perform the same actions via keystrokes? Perhaps you can send keystrokes to the application to achieve what the mouse is doing, thus freeing up the mouse completely.
VB6 Library
If I helped you then please help me and rate my post!
If you solved your problem, then please mark the post resolved
-
Aug 2nd, 2010, 08:56 AM
#5
Re: How to make your own second cursor.
All would give you the same problem of focus tho.
-
Aug 2nd, 2010, 09:08 AM
#6
Re: How to make your own second cursor.
You don't actually need focus if you have the handle of the window you want to send messages to though.
More importantly though, have you looked at existing utilities like TeamPlayer and Windows 7 MultiMouse?
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
|