Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Main {
- public static void main(String[]args){
- Robot robot = null;
- try {
- robot = new Robot();
- } catch (AWTException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- try {
- Thread.sleep(2000);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- robot.keyPress(KeyEvent.VK_CONTROL);
- robot.keyPress(KeyEvent.VK_S);
- robot.keyRelease(KeyEvent.VK_S);
- robot.keyRelease(KeyEvent.VK_CONTROL);
- }}
Add Comment
Please, Sign In to add comment