DexterMorgan Posted April 11, 2008 Share Posted April 11, 2008 (edited) I know this is probably a really stupid question to you guys but i really dont understand much about Filereadline and stuff so this is what I have $line = 1 Do $thetext = Filereadline("Text.txt",$line) $line = $line + 1 Until $thetext = "" Msgbox(0,"Scores", $thetext) Lol i know im doing something wrong I just don't know What. Please Help Me! Edited April 12, 2008 by kkKrazy code Link to comment Share on other sites More sharing options...
Achilles Posted April 11, 2008 Share Posted April 11, 2008 $line = 1 $thetext = "" Do $thetext &= Filereadline("Text.txt",$line) & @CRLF $line = $line + 1 Until $thetext = "" Msgbox(0,"Scores", $thetext )I'm not sure if that's what you wanted... that will read the whole file into one string (I think). I don't know where you got the variable $thescores from because it's not affected in your do... until loop which might be causing some sort of error. My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
DexterMorgan Posted April 12, 2008 Author Share Posted April 12, 2008 (edited) $line = 1 $thetext = "" Do $thetext &= Filereadline("Text.txt",$line) & @CRLF $line = $line + 1 Until $thetext = "" Msgbox(0,"Scores", $thetext )I'm not sure if that's what you wanted... that will read the whole file into one string (I think). I don't know where you got the variable $thescores from because it's not affected in your do... until loop which might be causing some sort of error. Thank you for the really fast reply but it doesnt seem to work.. It only gets 1 line.. Fixed the $thescores thig wrong variable sorry Edited April 12, 2008 by kkKrazy code Link to comment Share on other sites More sharing options...
DexterMorgan Posted April 12, 2008 Author Share Posted April 12, 2008 Thank You it works now i just needed to change something... $line = 1 $thetext = "" Do $thetext &= Filereadline("text.txt",$line) & @CRLF $line = $line + 1 Until Filereadline("text.txt",$line) = "" Msgbox(0,"Scores", $thetext ) code Link to comment Share on other sites More sharing options...
covaks Posted April 12, 2008 Share Posted April 12, 2008 (edited) Dim $sText $file = FileOpen("Text.txt",0) Do $sText &= FileReadLine($file) & @CRLF Until @error = -1 FileClose($file) msgbox(0,"",$sText) Edited April 12, 2008 by covaks 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