PwneRL33T Posted August 24, 2014 Share Posted August 24, 2014 hey guys, i was wondering if anyone could explain to me for the use of a GUI? i have the GUI coded but i have it in a separate class from my main script.... how can i make it so the GUI pops up on start of script? how can i make the select able options i have on the script execute different sections of the code? how can i make the Start Script button execute the selected option? thanks to anyone that can provide me with this option.... if your just going to post random trolling just stop trying to boost your post count ;) Link to comment Share on other sites More sharing options...
Mysteryy Posted August 24, 2014 Share Posted August 24, 2014 hey guys, i was wondering if anyone could explain to me for the use of a GUI? i have the GUI coded but i have it in a separate class from my main script.... how can i make it so the GUI pops up on start of script? how can i make the select able options i have on the script execute different sections of the code? how can i make the Start Script button execute the selected option? thanks to anyone that can provide me with this option.... if your just going to post random trolling just stop trying to boost your post count In your script thread you need to make a new instance of the gui. ed. Gui gui = new Gui(); then you need to find a way that you like to connect the gui and script thread to get the options. For example in your gui, you can make a method public String getTreeName() and then after the uses selects a tree to chop, you use that method to get the tree name. This is just an example, but you can figure it out if you mess with it. ^_^ Link to comment Share on other sites More sharing options...
Alek Posted August 24, 2014 Share Posted August 24, 2014 You should learn how to make a basic GUI without a GUI maker, you're going to run into problems later if you don't have a basic understanding of how they work. 2 Link to comment Share on other sites More sharing options...
PwneRL33T Posted August 24, 2014 Author Share Posted August 24, 2014 In your script thread you need to make a new instance of the gui. ed. Gui gui = new Gui(); then you need to find a way that you like to connect the gui and script thread to get the options. For example in your gui, you can make a method public String getTreeName() and then after the uses selects a tree to chop, you use that method to get the tree name. This is just an example, but you can figure it out if you mess with it. sorry, im really bad at this... GUI gui = new GUI(); public String getLocation() { } thats the code i have now used, the main thing i really want to do is get the GUI to popup on start, due to eclipse would not let me run it to test it do i dont even know what it looks like :P You should learn how to make a basic GUI without a GUI maker, you're going to run into problems later if you don't have a basic understanding of how they work. i do know how to make a gui... i didnt use a gui maker, i watched a tutorial on youtube that someone linked in another GUI question in tutorials section i think.. but i just dont know how to implement it and make everything work on the script side Link to comment Share on other sites More sharing options...
NotoriousPP Posted August 24, 2014 Share Posted August 24, 2014 sorry, im really bad at this... GUI gui = new GUI(); public String getLocation() { } thats the code i have now used, the main thing i really want to do is get the GUI to popup on start, due to eclipse would not let me run it to test it do i dont even know what it looks like i do know how to make a gui... i didnt use a gui maker, i watched a tutorial on youtube that someone linked in another GUI question in tutorials section i think.. but i just dont know how to implement it and make everything work on the script side I already told you... Learn Java, this is basic Java stuff. If you don't understand how to do this, stop, and study the basics of Java, because no one here is going to spoonfeed you like you keep begging for us to do. 2 Link to comment Share on other sites More sharing options...
Mysteryy Posted August 24, 2014 Share Posted August 24, 2014 sorry, im really bad at this... GUI gui = new GUI(); public String getLocation() { } thats the code i have now used, the main thing i really want to do is get the GUI to popup on start, due to eclipse would not let me run it to test it do i dont even know what it looks like i do know how to make a gui... i didnt use a gui maker, i watched a tutorial on youtube that someone linked in another GUI question in tutorials section i think.. but i just dont know how to implement it and make everything work on the script side This is a basic concept of java. You need to make a new object of Gui type, you also need to make getters in your Gui class, not in your Script thread. These getters will return variables that are set based on user interaction with the gui. To keep the gui open, you can use a while loop in your script onStart method. Link to comment Share on other sites More sharing options...
PwneRL33T Posted August 24, 2014 Author Share Posted August 24, 2014 (edited) I already told you... Learn Java, this is basic Java stuff. If you don't understand how to do this, stop, and study the basics of Java, because no one here is going to spoonfeed you like you keep begging for us to do. "if your just going to post random trolling just stop trying to boost your post count " Edited August 24, 2014 by PwneRL33T Link to comment Share on other sites More sharing options...
NotoriousPP Posted August 24, 2014 Share Posted August 24, 2014 (edited) "if your just going to post random trolling just stop trying to boost your post count " Like I need post count, what does that achieve? Try to answer that please. If you think I'm trolling, there is less hope for you than I originally thought. Edited August 24, 2014 by NotoriousPP Link to comment Share on other sites More sharing options...
PwneRL33T Posted August 24, 2014 Author Share Posted August 24, 2014 Like I need post count, what does that achieve? Try to answer that please. If you think I'm trolling, there is less hope for you than I originally thought. not trolling as a main... but just posting on all of my requests for help just for the hell of it Link to comment Share on other sites More sharing options...
Swizzbeat Posted August 24, 2014 Share Posted August 24, 2014 and the reason i dont try learn "Java" is due to the fact is that it helps me with nothing to do with OSRS scripting... wut 3 Link to comment Share on other sites More sharing options...
PwneRL33T Posted August 24, 2014 Author Share Posted August 24, 2014 (edited) wut because the java tutors dont teach me about anything to do with OSRS i do know the basics of java so i don't know why people keep telling me... there's just some parts that i have never used or never even heard of before... like GUI for example.. i have seen it many times, i know how to make one, but have no clue what so ever on how to implement it or get it working in an already existent script Edited August 24, 2014 by PwneRL33T Link to comment Share on other sites More sharing options...
NotoriousPP Posted August 24, 2014 Share Posted August 24, 2014 and the reason i dont try learn "Java" is due to the fact is that it helps me with nothing to do with OSRS scripting... Dude you just made my fucking day! Thank you! Would you mind if I used this as my signature? Link to comment Share on other sites More sharing options...
PwneRL33T Posted August 24, 2014 Author Share Posted August 24, 2014 Dude you just made my fucking day! Thank you! Would you mind if I used this as my signature? you are all obviously taking this the wrong way.... probably just me putting it the wrong way... i know OSRS is all about java but what im trying to say is about 99% of the stuff people teach me i wont even use for a OSRS script... which is why i request help from a OSRS script writing forum.... i just dont understand why they have a "Questions" section if all people post on here are jst going to get ignorant people saying... "go learn java" basic java is not hard... and i know mainly osrs scripting is pretty basic... but for fuck sake... im not asking anyone to write me a full script just for some pointers on how to do something... and yes somtimes i ask for the code for something is because i know its so simple for some yet i just cant get it Link to comment Share on other sites More sharing options...
NotoriousPP Posted August 24, 2014 Share Posted August 24, 2014 you are all obviously taking this the wrong way.... probably just me putting it the wrong way... i know OSRS is all about java but what im trying to say is about 99% of the stuff people teach me i wont even use for a OSRS script... which is why i request help from a OSRS script writing forum.... i just dont understand why they have a "Questions" section if all people post on here are jst going to get ignorant people saying... "go learn java" basic java is not hard... and i know mainly osrs scripting is pretty basic... but for fuck sake... im not asking anyone to write me a full script just for some pointers on how to do something... and yes somtimes i ask for the code for something is because i know its so simple for some yet i just cant get i Because for one, you need to have a basic understand of Java to write scripts... Do you think your using a special "OSRS Script Writting Language"? No. You are using Java. i just dont understand why they have a "Questions" Because this a question area, not "Please spoonfood all the code I need, so I don't have to learn anything". Even take one step back further, creating a GUI have NOTHING to do with OSRS, that is a built in library in Java (Swing), so yes you need to know Java to create a GUI, which is what we all have said. Link to comment Share on other sites More sharing options...
PwneRL33T Posted August 24, 2014 Author Share Posted August 24, 2014 Because for one, you need to have a basic understand of Java to write scripts... Do you think your using a special "OSRS Script Writting Language"? No. You are using Java. Because this a question area, not "Please spoonfood all the code I need, so I don't have to learn anything". Even take one step back further, creating a GUI have NOTHING to do with OSRS, that is a built in library in Java (Swing), so yes you need to know Java to create a GUI, which is what we all have said. then you are stupider than you look, iv'e said about 4 times now i have made the GUI but i dont know how to implement it into my already existent script Link to comment Share on other sites More sharing options...