Hello,
using this code, the output file "Risultato.txt" is empty. Why?
'Read text File
ret = fd.Show("Choose a file to load:", "Okay", "Cancel", "", Null)
If ret = -3 OR fd.ChosenName = "" Then
Return
End If
If File.Exists(fd.FilePath, fd.ChosenName) = False Then
Msgbox(fd.ChosenName & " does not exist.", "")
Return
End If
Dim TR As TextReader
Dim TW As TextWriter
Dim s As String
TR.Initialize(File.OpenInput(fd.FilePath, fd.ChosenName))
TW.Initialize(File.OpenOutput(File.DirRootExternal & "/temp/output", "Risultato.txt", False ))
Do While s <> Null
s = TR.ReadLine
If s = Null Then
Else
s = xn_crypt.xn_trim_encrypt(s)
lbFile.Text = lbFile.Text & " " & s
TW.WriteLine(s)
Log(s)
End If
Loop
using this code, the output file "Risultato.txt" is empty. Why?
'Read text File
ret = fd.Show("Choose a file to load:", "Okay", "Cancel", "", Null)
If ret = -3 OR fd.ChosenName = "" Then
Return
End If
If File.Exists(fd.FilePath, fd.ChosenName) = False Then
Msgbox(fd.ChosenName & " does not exist.", "")
Return
End If
Dim TR As TextReader
Dim TW As TextWriter
Dim s As String
TR.Initialize(File.OpenInput(fd.FilePath, fd.ChosenName))
TW.Initialize(File.OpenOutput(File.DirRootExternal & "/temp/output", "Risultato.txt", False ))
Do While s <> Null
s = TR.ReadLine
If s = Null Then
Else
s = xn_crypt.xn_trim_encrypt(s)
lbFile.Text = lbFile.Text & " " & s
TW.WriteLine(s)
Log(s)
End If
Loop