java.awt.Robot is a best robot class which is mainly used to create a simulation software.Due to this robot class you can automatically enable mouse and keyboard event from java code itself.Following program helps us to invoke some basic stuff to get a picture about how to implement robot in java.
// Comment package com.sabari; import java.awt.AWTException; import java.awt.Robot; import java.awt.event.KeyEvent; public class simplerobot { public static void main(String[] args) { try { Robot robot = new Robot(); robot.delay(1000); robot.keyPress(KeyEvent.VK_J); robot.keyPress(KeyEvent.VK_A); robot.keyPress(KeyEvent.VK_V); robot.keyPress(KeyEvent.VK_A); robot.keyPress(KeyEvent.VK_SPACE); robot.keyPress(KeyEvent.VK_2); } catch (AWTException e) { e.printStackTrace(); } } }
Output Window
In order to run the program first you have to open notepad or word pad .Then you can easily Study the implementation workflow process of Robot.
Amazing blog with the latest information. Your blog helps me to improve myself in many ways. Looking forward for more like this.
ReplyDeleteRPA Training in Chennai
RPA course in Chennai
Blue Prism Training Chennai
Blue Prism Training in Anna Nagar
UiPath Training in Chennai
RPA Training in Velachery
RPA course in Chennai