Xiurik Posted October 16, 2013 Posted October 16, 2013 Hello, i have made my GUI for my script, with the labels, buttons, etc etc, but i really dont know where to put the code, im using windows builder but idk where to put the code or where to call the form, im LOST. If someone uses windows builder to make gui and know where to put the code please let me know. Also Thanks.
Swizzbeat Posted October 16, 2013 Posted October 16, 2013 I would personally make a new class called something like GUI or whatever you want. Then from your actual script class make a reference variable and set it up there. Also don't forget to create your own variable to keep the script from running while the GUI's up. A boolean of false changing to true when you confirm the stuff in the GUI should work. 1
Xiurik Posted October 16, 2013 Author Posted October 16, 2013 I would personally make a new class called something like GUI or whatever you want. Then from your actual script class make a reference variable and set it up there. Also don't forget to create your own variable to keep the script from running while the GUI's up. A boolean of false changing to true when you confirm the stuff in the GUI should work. Have you an Example of where to call and about the variable??
Swizzbeat Posted October 16, 2013 Posted October 16, 2013 I would personally make a new class called something like GUI or whatever you want. Then from your actual script class make a reference variable and set it up there. Also don't forget to create your own variable to keep the script from running while the GUI's up. A boolean of false changing to true when you confirm the stuff in the GUI should work. Have you an Example of where to call and about the variable?? I can get you one when I get home from school. If you want take a look at Anon's code for his guild fisher, its where I got the idea to do mine. http://osbot.org/forum/topic/3861-sharklobster-guild-fisher-last-update-10813-335-pm/
Toph Posted November 3, 2013 Posted November 3, 2013 I'd also like some help with this. I used to do it in other bot clients by: GUI gui = new GUI(); gui.setVisible(true); gui.setLocationRelativeTo(null); while (gui.isVisible()) { try {sleep(50);} catch (InterruptedException e) { } finally {}; } But it works horribly. When I dispose my GUI, it takes about 10 seconds to load whatever settings were chosen, and then the bot gets ~15 fps, from 50 before the script start.