Advertisement
SpeakeazyYT

Untitled

Aug 5th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. package ru.first;
  2.  
  3. import java.awt.event.*;
  4. import java.awt.Robot;
  5. public class test {
  6. public static void main(String args[]) {
  7. Robot bot = null;
  8. try {
  9. bot = new Robot();
  10. } catch (Exception failed) {
  11. System.err.println("Failed instantiating Robot: " + failed);
  12. }
  13. int mask = InputEvent.BUTTON1_MASK;
  14. bot.mouseMove(x, y);
  15. bot.mousePress(mask);
  16. bot.mouseRelease(mask);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement