Examples of Robot


Examples of java.awt.Robot

                                    log.debug("Taking screenshot");
                                    File f = File.createTempFile("screen", ".png",
                                        new File(System.getProperty("java.io.tmpdir")));
                                    Dimension ss = JNodeToolkit.getJNodeToolkit().getScreenSize();
                                    BufferedImage capture =
                                        new Robot().createScreenCapture(new Rectangle(0, 0, ss.width, ss.height));
                                    log.debug("Saving screenshot to " + f);
                                    ImageIO.write(capture, "png", f);
                                    log.debug("Saved " + f);
                                } catch (Exception e) {
                                    log.error("Error taking screenshot", e);
View Full Code Here

Examples of java.awt.Robot

        Point location = aCom.getLocationOnScreen();       
        //Point location = (Point) tEnv.getObjRelation("Location");
        //XAccessibleComponent aCom = (XAccessibleComponent) tEnv.getObjRelation("Location");
        //Point location = aCom.getLocationOnScreen();
        try {
            Robot rob = new Robot();
            rob.mouseMove(location.X + 20, location.Y + 10);
            rob.mousePress(InputEvent.BUTTON1_MASK);
            rob.mouseRelease(InputEvent.BUTTON1_MASK);
        } catch (java.awt.AWTException e) {
            System.out.println("couldn't adjust scrollbar");
        }

        shortWait();
View Full Code Here

Examples of java.awt.Robot

        Point point = window.getLocationOnScreen();
        Rectangle rect = window.getBounds();
       
        log.println("klick mouse button...");
        try {
            Robot rob = new Robot();
            int x = point.X + (rect.Width / 2)+50;
            int y = point.Y + (rect.Height / 2)+50;
            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");
            System.out.println("warte");
            shortWait();
            System.out.println("Press Button");
            rob.mousePress(InputEvent.BUTTON1_MASK);
            System.out.println("Release Button");
            rob.mouseRelease(InputEvent.BUTTON1_MASK);
            System.out.println("done "+rob.getAutoDelay());           
        } catch (java.awt.AWTException e) {
            log.println("couldn't press mouse button");
        }
               
View Full Code Here

Examples of java.awt.Robot

        Point location = aCom.getLocationOnScreen();       
        //Point location = (Point) tEnv.getObjRelation("Location");
        //XAccessibleComponent aCom = (XAccessibleComponent) tEnv.getObjRelation("Location");
        //Point location = aCom.getLocationOnScreen();
        try {
            Robot rob = new Robot();
            rob.mouseMove(location.X + 50, location.Y + 75);
            rob.mousePress(InputEvent.BUTTON1_MASK);
            rob.mouseRelease(InputEvent.BUTTON1_MASK);
        } catch (java.awt.AWTException e) {
            System.out.println("couldn't adjust scrollbar");
        }

        shortWait();
View Full Code Here

Examples of java.awt.Robot

                }
               
                if (isWindows() == false)
                    Thread.sleep(5000);

                Robot roby = new Robot();
                roby.keyPress(KeyEvent.VK_H);
                roby.keyRelease(KeyEvent.VK_H);
                buf.append("h");
               
                String s = getText(bean);
                if ( ! s.equals(buf.toString()))
                {
View Full Code Here

Examples of java.awt.Robot

                }
               
                if (isWindows() == false)
                    Thread.sleep(5000);

                Robot roby = new Robot();
                roby.mouseMove(300, 200);
                roby.waitForIdle();
                roby.mousePress(InputEvent.BUTTON1_MASK);
                roby.waitForIdle();
                roby.mouseRelease(InputEvent.BUTTON1_MASK);
                roby.waitForIdle();
                roby.keyPress(KeyEvent.VK_H);
                roby.waitForIdle();
                roby.keyRelease(KeyEvent.VK_H);
                roby.waitForIdle();

                buf.append("h");
                Thread.sleep(1000);               
                String s = getText(bean);
                System.out.println(" getText: " + s);
                if ( ! s.equals(buf.toString()))
                {
                    roby.mousePress(InputEvent.BUTTON1_MASK);
                    roby.waitForIdle();
                    roby.mouseRelease(InputEvent.BUTTON1_MASK);
                    roby.waitForIdle();
                    roby.keyPress(KeyEvent.VK_H);
                    roby.waitForIdle();
                    roby.keyRelease(KeyEvent.VK_H);
                    roby.waitForIdle();

                    String sH = "h";
                    Thread.sleep(1000);               
                    String s2 = getText(bean);
View Full Code Here

Examples of jnode.dto.Robot

        // TODO: optiomize
        IRobot oRobot = robotMaps
            .get(message.getToName().toLowerCase());
        if (oRobot == null) {
          try {
            Robot robot = ORMManager.get(Robot.class).getById(
                message.getToName().toLowerCase());
            if (robot != null) {
              robotname = robot.getRobot();
              Class<?> clazz = Class
                  .forName(robot.getClassName());
              oRobot = (IRobot) clazz.newInstance();
              robotMaps.put(robotname, oRobot);
              logger.l4("Message " + message.getMsgid()
                  + " sent to robot " + robotname);
            }
View Full Code Here

Examples of jrdesktop.server.robot

        return RMIServer.getStatus();
    }
   
    public static void init() {
        running = true;
        rt = new robot();
        clipbrdUtility = new ClipbrdUtility();
        SysTray.updateServerStatus(Commons.SERVER_STARTED);        
    }
View Full Code Here

Examples of net.sf.uadetector.internal.data.domain.Robot

    b.appendRobot(null);
  }

  @Test
  public void appendRobot_successful() {
    final Robot robot = new Robot(12, "Majestic-12", UserAgentFamily.MJ12BOT, "Majestic-12 bot", "http://majestic12.co.uk/bot.php",
        "Majestic-12", "http://www.majestic12.co.uk/", "MJ12bot/v1.4.3", "mj12.png");
    final DataBuilder b = new DataBuilder();
    assertThat(b.appendRobot(robot)).isSameAs(b);

    // test to add same robot one more time
View Full Code Here

Examples of net.suncrescent.clicker.robot.Robot

    final Dimension screenSize = Environment.getScreenSize();
    this.window.setLocation(screenSize.width - this.window.getSize().x - 20, screenSize.height - this.window.getSize().y - 40);
  }

  private void initRobot() throws AWTException {
    this.robot = new Robot();
    this.robot.getEventProvider().addEventListener(new RobotListener());
  }
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.