java - How to move the mouse cursor and apply a left click? -


in java trying following, none working (even though compiles well). doing wrong?

enter image description here

import java.awt.robot; import java.awt.event.inputevent; public class kiosk {   public static void main(string[] args) {     try {       robot robot = new robot();       // move cursor        robot.mousemove(300, 500);       // , then, left click       robot.mousepress(inputevent.button1_mask);       robot.mouserelease(inputevent.button1_mask);              } catch (exception e) {         e.printstacktrace();     }   } } 


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -