I figured out how to write a text stream to any file you want in any format to a file from inside AM. No plugin needed.
Tutorial coming soon!
Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support
Sub Write2File(yourfilename, byval savetext)
dim myfile
set filesys = CreateObject ("Scripting.FileSystemObject")
set myfile = filesys.CreateTextFile (GetPath(2) & yourfilename, true)
set myfile = filesys.GetFile(GetPath(2) & yourfilename)
set txtstream = myfile.OpenAsTextStream (2, -2)
txtstream.Write savetext
txtstream.Close
End Sub
Function GetAllFileContents(yourfilename)
Dim mytext
Dim myfile
set filesys = CreateObject ("Scripting.FileSystemObject")
set myfile = filesys.GetFile(GetPath(2) & yourfilename)
set txtstream = myfile.OpenAsTextStream (1, -2)
mytext = txtstream.readall()
txtstream.Close
GetAllFileContents = mytext
End Function
Return to Post Your Own Tutorials
Users browsing this forum: No registered users and 0 guests