May 8, 20196 yr I have this snippet of code that will move the mouse offscreen. It works fine. See the code below: private void antiBanMoveMouseOffscreen() { int myMouseOffscreenAverage = random(learningData.MOUSE_OFFSCREEN_START, learningData.MOUSE_OFFSCREEN_END); paint.state("[Anti-Ban] Moving mouse offscreen for " + myMouseOffscreenAverage + "ms to simulate AFK..."); getMouse().moveOutsideScreen(); Sleep.sleepUntil(() -> false, myMouseOffscreenAverage); paint.state("[Anti-Ban] Complete!"); } I want to unfocus the OSBuddy client after I do this. I see a method to check if the client is focused: getClient().hasFocus() But I don't see an equivalent "getClient().setFocus()". Anyone know how to do this in OSBot? Thanks! Edited May 8, 20196 yr by Lansana Camara
May 8, 20196 yr There's an array of frames in the JFrame class: JFrame.getFrames()[0].setFocus(false)
February 18, 20224 yr Does anyone else know how to do this? I tried what liverare suggested and it didn't work at all. It brought up a widget debugging window. edit: nvm, figured it out Edited February 18, 20224 yr by adelmas
Create an account or sign in to comment