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

14
LINES

< > BotCompany Repo | #1019908 // robot_leftMouseButtonPressOrRelease_scaled

JavaX fragment (include)

1  
static void robot_leftMouseButtonPressOrRelease_scaled(bool down, double x, double y) {
2  
  int dummyWidth = 100000;
3  
  robot_leftMouseButtonPressOrRelease_scaled(down, iround(x*dummyWidth), iround(y*dummyWidth), dummyWidth);
4  
}
5  
6  
static void robot_leftMouseButtonPressOrRelease_scaled(bool down, int x, int y, int scaledWidth) ctex {
7  
  final new Robot robot;
8  
  int button = InputEvent.BUTTON1_DOWN_MASK;
9  
  dm_moveMouseImmediate_direct_scaled(x, y, scaledWidth);
10  
  if (down)
11  
    robot.mousePress(button);
12  
  else
13  
    robot.mouseRelease(button);
14  
}

Author comment

Began life as a copy of #1005793

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019908
Snippet name: robot_leftMouseButtonPressOrRelease_scaled
Eternal ID of this version: #1019908/8
Text MD5: aef843e4a14ae83a338ed6430bf4d9bd
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-30 22:35:08
Source code size: 553 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 311 / 361
Version history: 7 change(s)
Referenced in: [show references]