I'm using the Robot class to send commands to windows to control the mouse and keyboard for work. Everything seems to be working fine but for the life of me I cannot send a Ctrl+Alt+Delete command to unlock my workstation so I can begin processing. Has anyone EVER done this before? A simple sniplet of my code is below: roboCop.keyPress(KeyEvent.VK_CONTROL); roboCop.delay(500); roboCop.keyPress(KeyEvent.VK_ALT); roboCop.delay(500); roboCop.keyPress(KeyEvent.VK_DELETE);
It seems like when keyPress(KeyEvent.VK_ALT) is called my previous command is released....I have divided this task up and was able to do control V to past and alt A to navigate my menu, but when I put the commands together they don't seem to work.
Any suggestions would be appreciated. Thanks, Ryan Bailey
SCJP 1.4, SCWCD
Java: The power, elegance, and simplicity of a hand grenade
I would be surprised if this was possible in pure Java, as it would be a serious security problem.
Moving to Swing/AWT...
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus