How do I create a formatted .txt file

Blitz3D Forums/Blitz3D Programming/How do I create a formatted .txt file

CopperCircle(Posted 2003) [#1]
How do I create a formatted .txt file, that can be loaded into word pad etc..


darklordz(Posted 2003) [#2]
www.wotsit.org might help
http://www.wotsit.org/download.asp?f=wword60t


Klaas(Posted 2003) [#3]
what do you mean with formated ?

You can simply create a .txt file with WriteFile and WirteLine commands !

In txt files it is not possible to set color or font ! It's just plain text.


darklordz(Posted 2003) [#4]
@klaar with formatted i guess he mean what the txtfile headers are. Every file has a header that identifies certain aspects of that file. Wotsit is a great resource for this....

hope it helps
l8tr


Klaas(Posted 2003) [#5]
okay, but i think txt files got no headers .. well if i open them in a hexeditor there is just plain text.


Dirk Krause(Posted 2003) [#6]
I guess he means something from here:
http://www.blitzbasic.com/codearcs/codearcs.php?cat=8


darklordz(Posted 2003) [#7]
@Klaas yes but the issue @ hand is formatted txt....


CopperCircle(Posted 2003) [#8]
Thanks all, by formatted i mean saving a file with tabs in.


fredborg(Posted 2003) [#9]
Tab$ = Chr$(9)
stream = WriteFile("C:\Formatted.txt")
WriteLine(stream,Tab$+"This")
WriteLine(stream,Tab$+Tab$+"Works")
WriteLine(stream,Tab$+Tab$+Tab$+"Fine!")
CloseFile(stream)