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
  • Get input from JFrame TextInput before scripts start rolling through onLoop


    Recommended Posts

    Sup hombres,

    I have a JFrame with a text box that the player is meant to enter values in to (2 boxes) and these values will then be used in the main body of the script eventually.


    I currently have the JFrame pop, and I can enter values etc, but the onLoop method just starts chugging away as soon as I start the script.


    I thought adding a return value to my JFrame method (once the values are populated - return) would work, but it doesn't seem to stop the next method from executing. Any suggestions? I have seen popup boxes upon starting other's code before, but before I start tcpdumping trying to figure out how it's done, I may as well just ask.

    Link to comment
    Share on other sites

    When you set the JFrame data set a boolean variable called shouldRun equal to true. 

    Then wrap your scripts execution in an if statement basically saying if(shouldRun) { *insert script execution here* }

    Simple as that. Ez pz

    Link to comment
    Share on other sites

    25 minutes ago, myBeauty said:

    Thanks for the tip, I'll try that out! +1 when I can

    Awesome lmk if you need anything else 

    Link to comment
    Share on other sites


    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.