GEOSoft Posted July 10, 2008 Share Posted July 10, 2008 (edited) I see what the problem is. I'll take another look at that function to see what can be done with it. Edit. I see it already. I did a re-write on that function not long ago and someone else has re-written it since. The way it stands now it can't work properly. EDIT 2 I was wrong. It will work the way it is although I would rather have seen $sTemp = StringStripWS($sTemp, 2) Instead of If StringRight($sTemp, 1) = @LF Then $sTemp = StringTrimRight($sTemp, 1) If StringRight($sTemp, 1) = @CR Then $sTemp = StringTrimRight($sTemp, 1) However, back to the problem that both of you have pointed out. _ArrayDisplay() will show as empty because of (I Think) the "|"s that you have in that file. If you run the same code using this you will see that it does indeed work #include <File.au3> #include <Array.au3> $file = @DesktopDir & "\ip.txt" Dim $aIP = "" _FileReadToArray($file, $aIP) _ArrayDisplay($aIP, "IP List") For $I = 1 To $aIP[0] MsgBox(0, "TEST", $aIP[$I]) Next Edited July 10, 2008 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Skruge Posted July 10, 2008 Share Posted July 10, 2008 _FileReadToArray() is reading the data properly, but _ArrayDisplay() treats the pipes as separators by default. Try passing a different $sSeparator parameter. _ArrayDisplay($aIP, "IP List", -1, 0, @TAB) [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
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