Results 1 to 11 of 11
- 10-11-2010, 06:51 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 18
- Rep Power
- 0
Is there a way to make robot use a virtual mouse?
Hello i was wondering if there is a way to do the following.
when you use the robot function to simulate mouse clicks aswell as keyboard.
can you someway make it use a inbuildt virtual mouse, so you can move your own mouse around aswell as type on another area of the screen while java use a extra virtual mouse and keyboard on another part of the screen?
- 10-11-2010, 06:53 PM #2
Not directly, but you could program this functionality. But what exactly are you trying to accomplish? There is probably an easier way to fulfill your requirements.
- 10-11-2010, 07:13 PM #3
Member
- Join Date
- Oct 2010
- Posts
- 18
- Rep Power
- 0
Its for a macro so when i got large enough screen resolution i can run many at once.
- 10-11-2010, 07:23 PM #4
I don't know of a way to (reliably) do this with Robot. You might want to consider writing your own pseudo-macro using doClick() and setText(), depending on what exactly you're trying to do.
- 10-11-2010, 07:38 PM #5
Member
- Join Date
- Oct 2010
- Posts
- 18
- Rep Power
- 0
But can it be done at all? if i didnt express my self good enough.
basicly this is what i mean that it use a differnt mouse from your own, a virtual mouse, and if you can make more than 1 thats super!
and is there a method to implement an external client mouse to IE ?
Is doClick() and setText() virtual input for running app ? in that case THANK YOU =DLast edited by tom99; 10-11-2010 at 07:49 PM.
- 10-11-2010, 07:50 PM #6
You can't use a "virtual mouse" with just Robot. You could try to use the normal mouse, but as soon as you have more than one program using Robot running at once, things are going to go crazy.
But really, you should just try it and see what happens. Maybe it will be okay for your needs. If you find you do have a problem, then post a small runnable program and ask a specific question.
I don't know what that means.
- 10-11-2010, 08:07 PM #7
Member
- Join Date
- Oct 2010
- Posts
- 18
- Rep Power
- 0
I mean, if you can add virtual client mouse to internet explorer then simulate tasks with internet explorer minimized ?
What woud be the difference between robot.delay and thread.sleep ?Last edited by tom99; 10-11-2010 at 10:20 PM.
- 10-11-2010, 11:52 PM #8
No, you can't interact with a minimized window from a Java program. Not unless it exposes a public API that allows you to. IE or any other browser does not, which is A Good Thing™.
What exactly are you trying to accomplish?
db
- 10-12-2010, 01:27 AM #9
Member
- Join Date
- May 2010
- Posts
- 27
- Rep Power
- 0
The java.awt.Robot class controls the pointer. Not a magical pointer from unicorn land. Your pointer. So what is there to do about it? Well, you can download some virtual machine software and run your program in a separate virtual machine.
Are you trying to write a bot for a game? I'm trying to learn BCEL and I think that would be an excellent exercise. If you're trying to write a bot for Runescape... www.runedev.info www.powerbot.org <-- open source bots to use as examples.
EDIT:
A really buggy, glitchy, detectable way would be to have the mouse switching back and forth between your happy places... but if whatever you're trying to macro has any macro defenses, you're going to need a good excuse after you're caught.Last edited by somanayr; 10-12-2010 at 01:33 AM.
- 10-12-2010, 11:04 AM #10
Member
- Join Date
- Oct 2010
- Posts
- 18
- Rep Power
- 0
I know you can use a virtual machine but if you are running a os witch support win32 programs such as winxp, then it takes atleast 512mb of ram of your host.
and if your host only got 1gb ram then its a bad idea. I know how to write a macro, but not how i can use one witch uses "magical cursor from unicorn land" lol
- 10-14-2010, 01:33 AM #11
Member
- Join Date
- May 2010
- Posts
- 27
- Rep Power
- 0
As far as I know, there are not modules for virtual cursors, although I was flipping through SIGAR and it seemed like that might have some sort of support for it. I didn't really look into it. As far as I'm aware, you can't have 2-3 pointers going at once, and if you do want to do it, Java isn't the language to do it in. (probably better to do it in a lower level language like c++ or c# so you have more control)
Similar Threads
-
Robot
By PhQ in forum AWT / SwingReplies: 13Last Post: 08-26-2010, 12:10 AM -
Robot Game
By yanipao in forum New To JavaReplies: 1Last Post: 03-24-2010, 10:51 AM -
Robot Game
By Galore in forum New To JavaReplies: 7Last Post: 03-21-2010, 06:14 PM -
Mouse Listener for mouse floating over object?
By Krooger in forum AWT / SwingReplies: 1Last Post: 11-18-2009, 04:34 AM -
How to make virtual keystroke output?
By Lynx09 in forum Suggestions & FeedbackReplies: 2Last Post: 03-31-2009, 12:33 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks