Hey everyone. This should be a really simple problem, but for some reason I can't get it to work correctly. I'm working on just a simple notepadish part of a project, and I can't save/load text files from a text area. I can load it in line-by-line and then add a char(10) or char(13) to the end of the line to make a line break, and it looks fine, but then trying to save the file I get all sorts of problems. Since there is only a writeline (I believe writestring adds some information to the beginning of the string), im trying to break the textareatext string into lines with this:
but it doesn't keep the line "structure" and then opening it in the actual notepad it has the added char(10/13)'s (showing up as boxes). I'm kind of stumped on how to accomplish this (maybe im just missing something...). Thanks for any help.
f=WriteFile(file$) temp_len=0 temp$=TextAreaText(g_text) ;whole file For i=0 To TextAreaLen(g_text,2) ;count lines WriteLine(f,Mid$(temp$,temp_len,TextAreaLineLen(g_text,i))) temp_len=TextAreaChar(g_text,i+1) Next CloseFile(f)
but it doesn't keep the line "structure" and then opening it in the actual notepad it has the added char(10/13)'s (showing up as boxes). I'm kind of stumped on how to accomplish this (maybe im just missing something...). Thanks for any help.