PureSc0pe Posted May 4, 2004 Posted May 4, 2004 I have the .ini reader from mentallis.org, but is there a .vb file that reads and writes using .cfg files? Also, it would need to write like this: Save File "True" Save Logs "False" Instead of: Save File=True Save Logs=False If you know how to do so, please help. :( Quote It's not impossible, it's Inevitable.
mooman_fl Posted May 4, 2004 Posted May 4, 2004 What is to stop you from writing your own? Parsing the lines in your .cfg file should be easy using regex. Quote "Programmers are tools for converting caffeine into code." Madcow Inventions -- Software for the Sanity Challenged.
PureSc0pe Posted May 4, 2004 Author Posted May 4, 2004 What is to stop you from writing your own? Parsing the lines in your .cfg file should be easy using regex. Can you tell me a little more about this? Quote It's not impossible, it's Inevitable.
PureSc0pe Posted May 5, 2004 Author Posted May 5, 2004 I'll do it like this instead....How can I make the "" go around the TextBox51.Text? Dim StreamWriter As New IO.StreamWriter("serv config.cfg") StreamWriter.Write("set sv_serverip" & " & TextBox51.Text & ") StreamWriter.Close() I need it to write like this with the quotations: ''''Textbox51.text = 12.34.56.78.... set sv_serverip "12.34.56.78" Quote It's not impossible, it's Inevitable.
Denaes Posted May 5, 2004 Posted May 5, 2004 I need it to write like this with the quotations: You can generally write however you like, but to write double quotes, I think you need to use the asci keycode or the .net/vb keycode (which is probobly just a wrapped asci keycode). I've never really seen the huge todo about needing special methods of reading/writing input, unless you're going to share it with another program. Personally I use XML becuase it's the easiest, but I've used plain text and just thought up a method on the fly for writing/reading. You just need to figure a way to seperate what is the "Name" of the property, and what is the data within. In your case, it's the text on a line up to the quotation mark that is telling the program what the setting is, then after the quote and until the next one is the setting. It's really easy to create a class to read/write in this fashion and keep it generic enough to use in all your apps. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.