8,452
edits
Paradox-01 (talk | contribs) mNo edit summary |
Paradox-01 (talk | contribs) 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 | |||
edits