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
  • Try asking for help in the chatbox
  • Get input from JFrame TextInput before scripts start rolling through onLoop


    myBeauty
     Share

    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

    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
     Share

    ×
    ×
    • 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.