June 1, 20205 yr Mouse press and release?do it! Similar to the keyboard :pressKey(int keyCode) releaseKey(int keyCode) Desired effect: mouse.press; sleep(100); mouse.release; help!!!! Edited June 1, 20205 yr by dayong143333333
June 1, 20205 yr https://osbot.org/api/org/osbot/rs07/input/mouse/ClientMouseEventHandler.html#generateBotMouseEvent-int-long-int-int-int-int-boolean-int-boolean- Edited June 1, 20205 yr by Chris
June 1, 20205 yr Author 13 minutes ago, Chris said: https://osbot.org/api/org/osbot/rs07/input/mouse/ClientMouseEventHandler.html#generateBotMouseEvent-int-long-int-int-int-int-boolean-int-boolean- thanks ! but I'm a little dizzy😱 public void generateBotMouseEvent(int id, // detailed explanation long time, // detailed explanation int modifiers, // detailed explanation int x, // detailed explanation int y, // detailed explanation int clickCount, // detailed explanation boolean popupTrigger, //detailed explanation int button, //detailed explanation boolean botInput) //detailed explanation Please explain👍 I am a rookie
June 1, 20205 yr Examples Quote private void pressMouse() { getBot().getMouseEventHandler().generateBotMouseEvent(MouseEvent.MOUSE_PRESSED, System.currentTimeMillis(), 0, getMouse().getPosition().x, getMouse().getPosition().y, 1, false, MouseEvent.BUTTON1, true); } private void releaseMouse() { getBot().getMouseEventHandler().generateBotMouseEvent(MouseEvent.MOUSE_RELEASED, System.currentTimeMillis(), 0, getMouse().getPosition().x, getMouse().getPosition().y, 1, false, MouseEvent.BUTTON1, true); } public void generateBotMouseEvent(int id, // MouseEvent.MOUSE_PRESSED or MouseEvent.MOUSE_RELEASED I think there maped to 1 and 0 long time, // The system time of when you want this click to happen. int modifiers, // Set this to 0. int x, //the x on a cartisian plane (0,0) is top left int y, // the y on a cartisian plane int clickCount, // 1 is click once 2 is double ... boolean popupTrigger, //just make this false int button, //MouseEvent.BUTTON1 , MouseEvent.BUTTON2 right/left boolean botInput) //make this true This a tip for all new to coding and want to see exaples of obscure code with bad docs.(I have said it like 30 times) goto github.com login type the string of the package you are using your case "org.osbot.rs07.input.mouse.MouseDestination;" put osbot after click Code its under Repositories (https://github.com/search?q=org.osbot.rs07.input.mouse.MouseDestination&type=Code) Look at the code and try to make it work. If you cant find anything try searching other keywords or using something else or rethink logic
June 1, 20205 yr Author 1 hour ago, Nbacon said: Examples public void generateBotMouseEvent(int id, // MouseEvent.MOUSE_PRESSED or MouseEvent.MOUSE_RELEASED I think there maped to 1 and 0 long time, // The system time of when you want this click to happen. int modifiers, // Set this to 0. int x, //the x on a cartisian plane (0,0) is top left int y, // the y on a cartisian plane int clickCount, // 1 is click once 2 is double ... boolean popupTrigger, //just make this false int button, //MouseEvent.BUTTON1 , MouseEvent.BUTTON2 right/left boolean botInput) //make this true This a tip for all new to coding and want to see exaples of obscure code with bad docs.(I have said it like 30 times) goto github.com login type the string of the package you are using your case "org.osbot.rs07.input.mouse.MouseDestination;" put osbot after click Code its under Repositories (https://github.com/search?q=org.osbot.rs07.input.mouse.MouseDestination&type=Code) Look at the code and try to make it work. If you cant find anything try searching other keywords or using something else or rethink logic thanks thanks thanks thanks👍
Create an account or sign in to comment