Jump to content

How to blur/unfocus client


Recommended Posts

Posted (edited)

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 by Lansana Camara
  • Like 1
  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...