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
  • Does onPause() work in TaskScripts?


    raptor

    Recommended Posts

    Use case: I am trying to detect when my script is paused from the DreamBot GUI, so I can place a "Paused" overlay on my script.

     

    Issue: When I override onPause() in my main class that extends TaskScript, my code never gets executed. This behavior occurs whether I call super.onPause() before my code, after my code, or not at all.

     

    Has anyone dealt with this? Am I using the wrong method to hook the pause event? Any help is appreciated!

    Link to comment
    Share on other sites

    Use case: I am trying to detect when my script is paused from the DreamBot GUI, so I place a "Paused" overlay on my script.

     

    Issue: When I override onPause() in my main class that extends TaskScript, my code never gets executed. This behavior occurs whether I call super.onPause() before my code, after my code, or not at all.

     

    Has anyone dealt with this? Am I using the wrong method to hook the pause event? Any help is appreciated!

    I think onPause() may be broken. @Pandemic

    Link to comment
    Share on other sites

    you can get around this by running something in another thread that checks to see if the script is paused

    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.