progamerz Posted March 1, 2016 Posted March 1, 2016 Hey, I created a private script for my self and created a simple Console GUI, how can i make the script send text to the Console GUI which i made? Thanks, Progamerz
Vilius Posted March 1, 2016 Posted March 1, 2016 Im guessing you could make a scrollable text area and add a new line to it each time u print something to it.
progamerz Posted March 1, 2016 Author Posted March 1, 2016 Im guessing you could make a scrollable text area and add a new line to it each time u print something to it. I did that but idk how to make it print something on it this is what i am asking... tried many.
Vilius Posted March 1, 2016 Posted March 1, 2016 I did that but idk how to make it print something on it this is what i am asking... tried many.Be more definitive man, what did you try, what do you have now. You really do need to provide more information.
progamerz Posted March 1, 2016 Author Posted March 1, 2016 i searched google i didn't understand anything see my script has states and etc and i thought without using log("") the OSBot's one why don't i create a console for my self so i created a GUI and and had jTextArea so i wanted like without using OSBot's logger as console i wanted to try to make my console.
Vilius Posted March 1, 2016 Posted March 1, 2016 i searched google i didn't understand anything see my script has states and etc and i thought without using log("") the OSBot's one why don't i create a console for my self so i created a GUI and and had jTextArea so i wanted like without using OSBot's logger as console i wanted to try to make my console. Then I guess you could do this. public void logConsole(String str){ textArea.append(str+"\n"); } then you could call the method like so where you need it. logConsole("Test");
progamerz Posted March 1, 2016 Author Posted March 1, 2016 Then I guess you could do this. public void logConsole(String str){ textArea.append(str+"\n"); } then you could call the method like so where you need it. logConsole("Test"); Says error on the textarea, says it cannot be resolved.
Vilius Posted March 1, 2016 Posted March 1, 2016 Says error on the textarea, says it cannot be resolved.The textarea is your JTextArea variable.Its JTextArea textarea = ... which you defined it yourself in the gui class
progamerz Posted March 1, 2016 Author Posted March 1, 2016 The textarea is your JTextArea variable. Its JTextArea textarea = ... which you defined it yourself in the gui class Ik i checked the variable it is textArea and i typed it like that in the script but says cannot be resolved.
Vilius Posted March 1, 2016 Posted March 1, 2016 (edited) Ik i checked the variable it is textArea and i typed it like that in the script but says cannot be resolved.Where are you putting in that method, in your script class or in your gui class? It should go into the gui class.Or can you just pm me you gui class and I will fix it for you. Edited March 1, 2016 by Vilius
progamerz Posted March 1, 2016 Author Posted March 1, 2016 Where are you putting in that method, in your script class or in your gui class? It should go into the gui class. Or can you just pm me you gui class and I will fix it for you. Says u can't receive messages