myBeauty 0 Share Posted March 29, 2020 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 More sharing options...
yeeter 491 Share Posted March 29, 2020 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 More sharing options...
myBeauty 0 Author Share Posted March 29, 2020 Thanks for the tip, I'll try that out! +1 when I can Link to comment Share on other sites More sharing options...
yeeter 491 Share Posted March 29, 2020 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now