Sasquatch69
Programmer
Hi,
i got a little problem. I made a Script in VB(not vbscript) who convert some caractere in a text file
My code:
Private Sub Main()
Dim temp As Byte
Open "D:\input.txt" For Binary As #1 Open "D:\output.txt" For Binary As #2
While Not EOF(1)
Get #1, , temp
If (temp = 59) Then 'if " ; "
temp = 138 ' replace by " è "
Put #2, , temp
ElseIf (temp = 61) Then
temp = 147 ' replace by " ô "
Put #2, , temp
ElseIf (temp = 58) Then ' :
temp = 133 ' replace by " à "
Put #2, , temp
ElseIf (temp = 62) Then
temp = 130 ' replace by " é "
Put #2, , temp
Else
Put #2, , temp
End If
Wend
' close file
Close #1
Close #2
End Sub
Now my problem is, I don't know how to pass a file to my application!! I make a .exe with this programme, and i need to create a exe application for every files i need to convert. How can i pass a variable(c:\newfile.txt) to a EXE???
Thanks
(sorry for my bad english)
i got a little problem. I made a Script in VB(not vbscript) who convert some caractere in a text file
My code:
Private Sub Main()
Dim temp As Byte
Open "D:\input.txt" For Binary As #1 Open "D:\output.txt" For Binary As #2
While Not EOF(1)
Get #1, , temp
If (temp = 59) Then 'if " ; "
temp = 138 ' replace by " è "
Put #2, , temp
ElseIf (temp = 61) Then
temp = 147 ' replace by " ô "
Put #2, , temp
ElseIf (temp = 58) Then ' :
temp = 133 ' replace by " à "
Put #2, , temp
ElseIf (temp = 62) Then
temp = 130 ' replace by " é "
Put #2, , temp
Else
Put #2, , temp
End If
Wend
' close file
Close #1
Close #2
End Sub
Now my problem is, I don't know how to pass a file to my application!! I make a .exe with this programme, and i need to create a exe application for every files i need to convert. How can i pass a variable(c:\newfile.txt) to a EXE???
Thanks
(sorry for my bad english)