FrankwazHere Posted August 26, 2009 Posted August 26, 2009 I was unable to post this in examples, or anything in examples for that matter. why is that? >_< I would like to share some little things i have created because i have learned so much from these forums. if you have a text file with strings in a list you can add a count to the beginning of them using this Hopefully this will help anyone somewhere along the way even if you hack it up and use it another way. $file = FileOpen("test.txt", 0) $inc = 0 If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text and add 1. 2. 3. 4. etc... While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop $inc = $inc+1 $line = $inc & "." & $line filewrite("test1.txt",$line & @CRLF) Wend FileClose($file) I have been looking around here for a while now and would like to be active, so here i am. ;Frank.
WolfWorld Posted August 26, 2009 Posted August 26, 2009 Welcome to the forum and grat that you gave something back. Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets!
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