Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Mouse/Keyboard Input


    TheScripts

    Recommended Posts

     

    Thank you for the suggestion. I have tested that method and it does not appear to solve the issue; the mouse and keyboard input is still disabled when I press the start button (after being paused).

     

    I have been able to, somewhat, get around the issue by adding the following to onLoop():

    if (!Instance.getInstance().isMouseInputEnabled()) {
        Instance.getInstance().setMouseInputEnabled(true);
    }
    if (!Instance.getInstance().isKeyboardInputEnabled()) {
        Instance.getInstance().setKeyboardInputEnabled(true);
    }
    

    You don't even have to check if they're not enabled, there's no adverse effects from just setting them to true :)

    Link to comment
    Share on other sites

    I think you should put it in a different thread and just check every 1 second to see if its disabled or not

     new Thread(() -> {
                final Instance i = Instance.getInstance();
                while (i.getScriptManager().isRunning()) {
                    i.setKeyboardInputEnabled(true);
                    i.setMouseInputEnabled(true);
                    sleep(1000);
                }
            }).start();
    
    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.