hmmm....if anyone know how to make VB script to edit text by space in visual basic?...
this simple text...write in notepad++
Code:
12907|a|20|44|1|5925|0|0|0|0|0|0|0|0|0|0|0|18|0|1|9|5|0|5|2|5|0|0|0|0|1|10|3|0|0|15400|7700|0|1|0|1|0|0|8|0|39|4|0|0|0|0|0|0|0|0|0|0|0|0|0.000000|0|0.000000|0|0.000000|0|0.000000|0|0.000000|0|0.000000|3|511|210|2866|301|0|0|0|0|0|0|0|0|0|a|
i want to make program so i can edit text by space....for example in up there i want edit text in space what writen 20...i want to edit 20 to 21 with visual basic script...so if that script can edit text by space i want to edit 5925 and another space too...
im make script that..but cant work...this my scipt for example i make...
Code:
Const ForReading=1
Const ForWriting=2
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
folder = “c:\rn\”
filePath = folder & “file.txt”
Set myFile = objFSO.OpenTextFile(filePath, ForReading, True)
Set myTemp= objFSO.OpenTextFile(filePath & “.txt”, ForWriting, True)
Do While not myFile.AtendofStream
myLine1 = myFile.ReadLine
myLine2 = myFile.ReadLine
If InStr(myLine1, “Birthday”) Then
myLine1 = “|Birthday=”
end if
If InStr(myLine2, “place”) Then
myLine2 = “|place=”
end if
myTemp.WriteLine myLine1
myTemp.WriteLine myLine2
loop
myFile.Close
myTemp.Close
results in….
VBScript runtime error: Input past end of file
anyone can help me to fix that?....please...