Package java.awt

Examples of java.awt.Robot.mouseMove()


        try
        {
            Robot rob = new Robot();
            int x = point.X + (rect.Width / 2);
            int y = point.Y + (rect.Height / 2);
            rob.mouseMove(x, y);
            System.out.println("Press Button");
            rob.mousePress(InputEvent.BUTTON3_MASK);
            System.out.println("Release Button");
            rob.mouseRelease(InputEvent.BUTTON3_MASK);
            System.out.println("done");
View Full Code Here


        try
        {
            Robot rob = new Robot();
            int x = point.X;
            int y = point.Y;
            rob.mouseMove(x, y);
            rob.mousePress(InputEvent.BUTTON1_MASK);
            rob.mouseRelease(InputEvent.BUTTON1_MASK);
        }
        catch (java.awt.AWTException e)
        {
View Full Code Here

                try {
                    Robot rob = new Robot();
                    int x = point.X + (rect.Width / 2);
                    int y = point.Y + (rect.Height / 2);
                    System.out.println("try to klick into the middle of the document");
                    rob.mouseMove(x, y);
                    rob.mousePress(InputEvent.BUTTON1_MASK);
                    rob.mouseRelease(InputEvent.BUTTON1_MASK);
                } catch (java.awt.AWTException e) {
                    System.out.println("couldn't press mouse button");
                }
View Full Code Here

            .round(((Float.valueOf(returnMap.get("y").toString())
                .floatValue()
                * ScreenDimensions.spinnerHeight / ScreenDimensions.resizeY) / Ampl_factor)
                + ScreenDimensions.spinnerY);

        robot.mouseMove(x, y);
        robot.mouseRelease(InputEvent.BUTTON1_MASK);
      } else if (action.equals("onmousedown")) {

        Robot robot = new Robot();

View Full Code Here

            .round(((Float.valueOf(returnMap.get("y").toString())
                .floatValue()
                * ScreenDimensions.spinnerHeight / ScreenDimensions.resizeY) / Ampl_factor)
                + ScreenDimensions.spinnerY);

        robot.mouseMove(x, y);
        robot.mousePress(InputEvent.BUTTON1_MASK);

      } else if (action.equals("mousePos")) {

        Robot robot = new Robot();
View Full Code Here

            .round(((Float.valueOf(returnMap.get("y").toString())
                .floatValue()
                * ScreenDimensions.spinnerHeight / ScreenDimensions.resizeY) / Ampl_factor)
                + ScreenDimensions.spinnerY);

        robot.mouseMove(x, y);

      } else if (action.equals("onkeydown")) {

        Robot robot = new Robot();

View Full Code Here

      if (action.equals("onmouseup")) {
        Robot robot = new Robot();
       
        Point p = getCoordinates(returnMap);
        robot.mouseMove(p.x, p.y);
        robot.mouseRelease(InputEvent.BUTTON1_MASK);
      } else if (action.equals("onmousedown")) {
        Robot robot = new Robot();

        Point p = getCoordinates(returnMap);
View Full Code Here

        robot.mouseRelease(InputEvent.BUTTON1_MASK);
      } else if (action.equals("onmousedown")) {
        Robot robot = new Robot();

        Point p = getCoordinates(returnMap);
        robot.mouseMove(p.x, p.y);
        robot.mousePress(InputEvent.BUTTON1_MASK);
      } else if (action.equals("mousePos")) {
        Robot robot = new Robot();

        Point p = getCoordinates(returnMap);
View Full Code Here

        robot.mousePress(InputEvent.BUTTON1_MASK);
      } else if (action.equals("mousePos")) {
        Robot robot = new Robot();

        Point p = getCoordinates(returnMap);
        robot.mouseMove(p.x, p.y);
      } else if (action.equals("onkeydown")) {
        Robot robot = new Robot();

        int key = getInt(returnMap, "k");
View Full Code Here

        long y = o==null?0:(Long)o;
       
        System.out.println(java.awt.MouseInfo.getPointerInfo().getLocation());
        try{
            Robot r = new Robot();
            r.mouseMove((int)x, (int)y);
            r.delay(2000);
            System.out.println("esperei");
            r.mouseMove((int)x, (int)y);
        }
        catch(Exception e){System.out.println("FEZE:\n"+e);}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.