franpol38000 Posted October 19, 2016 Posted October 19, 2016 Hello, I've a file.txt to save my datas. Sometime these datas are not good, so I've to filter the contents. Unfortunately, I don't know what to filter because I don't see which things are wrong. For example, when I want have the line $r of my file.txt , Autoit put this line $r of my file in 3 lines. But when I open directly my file, I see the content in 1 line. $liner = FileReadLine($file2,$r) what's the problem ? some datas to jump a line are invisibles, how can i see them ? Thanks in advance for your help .
Moderators JLogan3o13 Posted October 19, 2016 Moderators Posted October 19, 2016 How about an example of the file, so we can see what you're dealing with? It is most likely a carriage return on the line. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
franpol38000 Posted October 21, 2016 Author Posted October 21, 2016 Hi JLogan3o13, I don't know how I can join this file here. However, it's a simply file.txt. When I open the file with bloc-notes or another editor, I get a line like this : <Hello my name is><I like autoit> If I try to get this line with autoit, I get 2 lines : FileReadLine($file,1)=<Hello my name is> and FileReadLine($file,2)=<I like autoit> I know there is an invisible jump of line, but how can I get the content of this file without interpretation ? If I can see this code, I could do a stringreplace to delete this jump of line (unfortunately it's not @CRLF, not <br>) Thanks to your help.
l3ill Posted October 21, 2016 Posted October 21, 2016 (edited) Not sure what...but it works fine here. $sFilePath = @ScriptDir & "/test.txt" Local $hFileOpen = FileOpen($sFilePath) $sTest = Filereadline($hFileOpen) MsgBox(0,"", $sTest) Test.txtx = <Hello my name is><I like autoit> Edited October 21, 2016 by l3ill My Contributions... Reveal hidden contents SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now