File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
src/main/java/dev/botcity/framework/bot Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -589,7 +589,17 @@ public void clickAt(int px, int py) {
589589 this .x = px ;
590590 this .y = py ;
591591 moveAndclick ();
592-
592+ sleep (sleepAfterAction );
593+ }
594+
595+ public void clickAt (int px , int py , int numClicks ) {
596+ this .x = px ;
597+ this .y = py ;
598+ for (int i = 0 ; i < numClicks ; i ++) {
599+ moveAndclick ();
600+ sleep (100 );
601+ }
602+ sleep (sleepAfterAction );
593603 }
594604
595605 public void rightClickAt (int x , int y ) {
@@ -689,7 +699,7 @@ public void tripleClickRelative(int x, int y) {
689699 moveAndclick ();
690700 sleep (sleepAfterAction );
691701 }
692-
702+
693703 /**
694704 * Scroll down wheel action.
695705 * @param y wheel actions.
@@ -855,8 +865,8 @@ private void moveAndRightClick() {
855865 robot .mouseRelease (InputEvent .BUTTON3_MASK );
856866 }
857867
858- private void click (int waitAfter ) {
859- moveAndclick ( );
868+ public void click (int waitAfter ) {
869+ clickRelative ( visualElem . getWidth ()/ 2 , visualElem . getHeight ()/ 2 );
860870 sleep (waitAfter );
861871 }
862872
You can’t perform that action at this time.
0 commit comments