MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

  • Java
  • Robot

Robot

The primary purpose of Robot is to facilitate automated testing of Java platform implementations.

  • RobotJavadoc

Sample code

   1 import java.awt.Robot;
   2 
   3 public class Main{
   4   public static int DELAY=10000;
   5   public static int MOVE=100;
   6   private static Robot robot;
   7 
   8   public static void main(String[] args){
   9     try{
  10       System.out.println("Hello");
  11       robot=new Robot();
  12       while(true){
  13         move(0,0);
  14         move(MOVE,0);
  15         move(MOVE,MOVE);
  16         move(0,MOVE);
  17       }
  18     }
  19     catch(Exception ex){
  20       ex.printStackTrace();
  21     }
  22   }
  23 
  24   public static void move(int x,int y){
  25     robot.mouseMove(x,y);
  26     robot.delay(DELAY);
  27   }
  28 }
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01