Mod Tool: Difference between revisions

578 bytes added ,  8 September 2012
m
Scripting: read/write txt
mNo edit summary
m (Scripting: read/write txt)
Line 520: Line 520:


  ' '''[17] create txt file + write lines'''
  ' '''[17] create txt file + write lines'''
 
txt_location = "C:\Softimage\Softimage_Mod_Tool_7.5\test.txt"
Set fso = CreateObject ("Scripting.FileSystemObject")
Set wText = fso.CreateTextFile (txt_location, 1)
wText.WriteLine "I'm a test file."
wText.WriteLine "Yo!"
wText.Close




  ' '''[18] read txt file'''
  ' '''[18] read txt file'''
Set objFileToRead = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\Softimage\Softimage_Mod_Tool_7.5\test.txt", 1)
do while not objFileToRead.AtEndOfStream
    strLine = objFileToRead.ReadLine()
    logmessage strLine
loop
' INFO : I'm a test file.
' INFO : Yo!
objFileToRead.Close
Set objFileToRead = Nothing




8,452

edits