Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Local $file = FileOpen(@ScriptDir & "\testfile.txt", 0)
- ; Check if file opened for reading OK
- If $file = -1 Then
- MsgBox(0, "Error", "Unable to open file.")
- Exit
- EndIf
- ; Read in 1 character at a time until the EOF is reached
- Local $chars = FileRead($file)
- ;MsgBox(0, "Char read:", $chars)
- ;$chars =StringReplace($chars, @CR, " ")
- $chars =StringReplace($chars, @TAB, " ")
- $chars = StringStripWS($chars, 7)
- $chars =StringReplace($chars, " .", ".")
- $chars =StringReplace($chars, " ,", ",")
- $chars =StringReplace($chars, " ;", ";")
- $chars =StringReplace($chars, " :", ":")
- ;MsgBox(0, "Char read:", $chars)
- FileClose($file)
- Local $file2 = FileOpen(@ScriptDir & "\testfile2.txt", 42)
- FileWrite($file2, $chars)
- FileClose($file2)
- ;ClipPut($chars)
- Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement