Results 1 to 7 of 7
Thread: Injecting Virtual Commands?
- 03-07-2012, 04:04 PM #1
Injecting Virtual Commands?
I've been toying around in the Robot class lately but I dislike how it takes over your entire computer to control your mouse and keyboard. I've been wondering what the method is called that injects virtual commands into a program without interrupting the use of the physical keyboard and mouse inputs.
Basically if I had a Word document open, I could load my program and it would then type a message into Word. While it was typing in Word I would open up another program and start using it normally. I know its possible, but I don't know where to start looking to find more information about it because I don't have the name of this method.
Any help would be appreciated.- Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
- +Rep people for helpful posts.
- 03-07-2012, 04:14 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 28
Re: Injecting Virtual Commands?
Sorry, I misread the original question ...
kind regards,
JosLast edited by JosAH; 03-07-2012 at 04:22 PM.
Build a wall around Donald Trump; I'll pay for it.
- 03-07-2012, 04:27 PM #3
Re: Injecting Virtual Commands?
Damn, got me excited over here that someone knew about this and was online. Haha, thanks for attempting JosAH.
- Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
- +Rep people for helpful posts.
- 03-07-2012, 07:38 PM #4
Re: Injecting Virtual Commands?
It might be possible to write a VBA script to a temp file (with deleteOnExit) and then execute that temp file from your Java program. The VBA script would have to locate the running instance of winword.exe and interact with it (note: I don't know whether VBA can actually do that, but I think it's likely.)
In pure Java it's not possible at all.
dbIf you're forever cleaning cobwebs, it's time to get rid of the spiders.
- 03-07-2012, 07:44 PM #5
Re: Injecting Virtual Commands?
Hmm, any clue to what the actual method is called? I know I have to deal with process threads but that's such a broad term that Googling it results mostly in security exploit forums.
- Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
- +Rep people for helpful posts.
- 03-07-2012, 07:55 PM #6
Re: Injecting Virtual Commands?
Try to find a VBA forum. Maybe on a Micorosoft site.
I'll give you this for free though: once your VBA has a handle to the Word application, the rest is typical OOPS programming: calling methods (only they're called functions), assigning returned values and passing parameters.
I know I've posted examples of using VBA from Java for less complicated matters, both here and on JavaRanch. See if you can find any, that'll give you an outline to work with.
dbIf you're forever cleaning cobwebs, it's time to get rid of the spiders.
- 03-07-2012, 11:59 PM #7
Re: Injecting Virtual Commands?
Ok, I'm slightly disappointed that Java doesn't have anything like this because I want to expand more on the different libraries of Java and this was definitely something I was interested in trying. I guess I can look at it half full though, I could then learn about how to make different languages interact with each other.
Thanks guys, always helpful.- Use [code][/code] tags when posting code. That way people don't want to stab their eyes out when trying to help you.
- +Rep people for helpful posts.
Similar Threads
-
[Virtual KeyBoard] - Anybody know ?
By Matheus Leandro Ferreira in forum Advanced JavaReplies: 1Last Post: 09-30-2009, 09:22 PM -
Virtual table?
By kblackwell in forum New To JavaReplies: 4Last Post: 01-31-2009, 11:54 PM -
Too many virtual Machine
By davantmay in forum Java AppletsReplies: 1Last Post: 07-06-2007, 11:53 PM -
Virtual Machine To Pda
By Heather in forum Advanced JavaReplies: 2Last Post: 06-30-2007, 04:11 PM -
C# Java Virtual Machine 1.0.1
By levent in forum Java SoftwareReplies: 0Last Post: 05-25-2007, 08:47 AM
Bookmarks