Communication Program and Saving Responses
in
Programming Questions
•
1 year ago
I have a program that just has a text box, when the "RETURN" key is pressed it sets theText(a string variable) to whatever is in the text box. If theText is equal to a string that is in the program, then the computer will return the proper response. The issue with this is that it takes a lot of if(){} and all the strings need to be preprogramed. What I want it to be able to to is to write the value that theText needs to be and the output in a .txt document that can be accessed by the script. I also would like it to be able to add to the document, like if theText is not a value in the .txt file, then ask for the correct response to theText and write the values in the .txt file. Could someone give me some guidance or help with I could achieve this?
1