August 11, 20205 yr I was wondering if it's possible to move/hover the Operating System's mouse cursor over the OSBot's mouse cursor. If so, any information would be so awesome! Thank you!
August 11, 20205 yr I guess you could use sockets for infomation on client state, osbot api for loaction on screen and java robot for mouse input. https://docs.oracle.com/javase/7/docs/api/java/awt/Robot.html Here are some networrking codes. @dreameo https://gist.github.com/DreamLean/61b215bad3c8f839ac4c84536d67c804 [This dumb tbh just use the osbot api for the mouse] Edited August 11, 20205 yr by Nbacon
August 11, 20205 yr 26 minutes ago, Nbacon said: I guess you could use sockets for infomation on client state, osbot api for loaction on screen and java robot for mouse input. https://docs.oracle.com/javase/7/docs/api/java/awt/Robot.html Here are some networrking codes. @dreameo https://gist.github.com/DreamLean/61b215bad3c8f839ac4c84536d67c804 [This dumb tbh just use the osbot api for the mouse] OSBot doesn't allow Robot
August 11, 20205 yr 1 hour ago, Naked said: OSBot doesn't allow Robot Thats what the sockets were for. To emend my first post. make 2 porgrams one for osbot and the other that runs natively on your computer. Connect them with sockets. Edit: everthing has a work around and osbot does not block Runtime.getRuntime().exec("some command line shit here") Just an example. I think it does not even need to be in the osbot data file. @ScriptManifest( author = "Bacon", name = "TestScript", info = "", version = 0.0D, logo = "" ) public class TestScript extends Script { @Override public int onLoop() throws InterruptedException { try { Runtime.getRuntime().exec("java -jar /home/USER/OSBot/Data/test/RuneLite.jar"); } catch (IOException e) { e.printStackTrace(); } return 60000; } } Edit 2 On linux do this "sudo apt-get install xdotool". and this skript moved my mouse around https://stackoverflow.com/questions/20595716/control-mouse-by-writing-to-dev-input-mice @Override public int onLoop() throws InterruptedException { try { for (int i = 0; i < 10; i++) { Runtime.getRuntime().exec("xdotool mousemove "+random(0,1000)+" "+random(0,1000)); Thread.sleep(1000); } } catch (IOException e) { e.printStackTrace(); } return 60000; } Edited August 11, 20205 yr by Nbacon
August 11, 20205 yr Author My god your a monster! I'm new to java and have been working on this for a couple weeks lol so it's hard for me to express how thankful I am for this! Thank you man!! @Nbacon Edited August 11, 20205 yr by jman77
Create an account or sign in to comment