Reading and Saving to a txt file in a certain directory HELP!!!
in
Programming Questions
•
1 year ago
Hello,
Basically i am working on a Web based RC car. I have already made the server and client and everything works great :D
But i have one slight problem. I have exported the client side of the RC Car Controller as a applet to my website and it works fine. But the IP Address and Port are defined within the Source Code. I did have it so that it read a txt file containing the IP Address and Port but when i exported as applet, the txt file became part of the jar file which i dont want. I need to be able to edit this txt file on my website which can then be read by processing and connect to the server.
Thats my first methord but im not sure on how to do it.
The second thing i thought of is prehaps bringing up a dialog box which you enter the IP Address and port into. But the client is created in the void.setup(){}. So i need to bring up the dialog box within the void.setup(){}, you enter the information and when you hit enter it continues with the code with the varibles you just set. Im not sure if this is possible.
I would paste the web link for the client so you can see what i mean by all this but then i would have random people controlling my RC car :P
Any help would be great,
Thanks,
Calum.
Basically i am working on a Web based RC car. I have already made the server and client and everything works great :D
But i have one slight problem. I have exported the client side of the RC Car Controller as a applet to my website and it works fine. But the IP Address and Port are defined within the Source Code. I did have it so that it read a txt file containing the IP Address and Port but when i exported as applet, the txt file became part of the jar file which i dont want. I need to be able to edit this txt file on my website which can then be read by processing and connect to the server.
Thats my first methord but im not sure on how to do it.
The second thing i thought of is prehaps bringing up a dialog box which you enter the IP Address and port into. But the client is created in the void.setup(){}. So i need to bring up the dialog box within the void.setup(){}, you enter the information and when you hit enter it continues with the code with the varibles you just set. Im not sure if this is possible.
I would paste the web link for the client so you can see what i mean by all this but then i would have random people controlling my RC car :P
Any help would be great,
Thanks,
Calum.
1