palindrome Posted November 24, 2017 Share Posted November 24, 2017 I am planning on making a simple mining bot and have been looking around for information. I can't find much on making a GUI to take user input before starting the script, such as what rocks to mine etc. Do you just create a normal GUI as you would normally in Java? Or is there some specific thing you need to do for OSBot? Quote Link to comment Share on other sites More sharing options...
Apaec Posted November 24, 2017 Share Posted November 24, 2017 Nothing special for OSBot! You can use JOptionPane for simple tasks, or even provide your own panel for a JOptionPane. Another good way to do it is extending JFrame. Apa Quote Link to comment Share on other sites More sharing options...
Viston Posted November 24, 2017 Share Posted November 24, 2017 (edited) Just create a GUI as you would normally do in Java, then take whatever input inside the textfield, and assign it to a variable, which then you can use to determine which rock to mine etc. However, AFAIK rocks don't have a name, which means you'll either need to use IDs (Not recommend) or Colours. Edited November 24, 2017 by Viston Quote Link to comment Share on other sites More sharing options...
palindrome Posted November 24, 2017 Author Share Posted November 24, 2017 (edited) Thanks for the information! Also, regarding the rocks, that was something I realized almost immediately, forgot the rocks were all just called "rocks" . Color seems like the best way to go. Edited November 24, 2017 by palindrome Quote Link to comment Share on other sites More sharing options...
TheWind Posted November 24, 2017 Share Posted November 24, 2017 I think using colors is definitely the way to go Quote Link to comment Share on other sites More sharing options...
liverare Posted November 25, 2017 Share Posted November 25, 2017 If you want a simplistic GUI, definitely look into JOptionPane, because that's as simple as it gets. If you want to try out being creative, you can download the source for my Glassblower script and see what I did, to see whether it helps you. Quote Link to comment Share on other sites More sharing options...
battleguard Posted November 26, 2017 Share Posted November 26, 2017 how would you use colors for rocks can you get all colors on a model or are you just doing something like getting the central pixel color. Quote Link to comment Share on other sites More sharing options...
The Undefeated Posted November 27, 2017 Share Posted November 27, 2017 This will get you started. https://osbot.org/forum/topic/87731-explvs-dank-gui-tutorial/ Quote Link to comment Share on other sites More sharing options...