Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1015522 // robotDragMouse v1

JavaX fragment (include)

1  
static void robotDragMouse(final Point a, int delay, final Point b) ctex {
2  
  final new Robot robot;
3  
  robot.mouseMove(a.x, a.y);
4  
  final int button = InputEvent.BUTTON1_DOWN_MASK;
5  
  robot.mousePress(button);
6  
  swingLater(delay, r {
7  
    robot.mouseMove(b.x, b.y);
8  
    robot.mouseRelease(button);
9  
  });
10  
}

Author comment

Began life as a copy of #1005571

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1015522
Snippet name: robotDragMouse v1
Eternal ID of this version: #1015522/1
Text MD5: c6bb1d8f5c678c1ed2b70aefb79ebe61
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-15 12:53:55
Source code size: 311 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 358 / 396
Referenced in: [show references]