t0ddie Posted June 19, 2005 Share Posted June 19, 2005 somewhere in these forums, i thought i saw a script that would parse through a text file, and make a new text file with any duplicate lines erased. so that the new file would not have any 2 lines that were the same. anyone know where? Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
HardCopy Posted June 19, 2005 Share Posted June 19, 2005 somewhere in these forums, i thought i saw a script that would parse through a text file, and make a new text file with any duplicate lines erased.so that the new file would not have any 2 lines that were the same.anyone know where?<{POST_SNAPBACK}>id copy the link, but ive not figured out how search for +gafrost +doubleswas posted a few days backHardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad Link to comment Share on other sites More sharing options...
t0ddie Posted June 19, 2005 Author Share Posted June 19, 2005 id copy the link, but ive not figured out how search for +gafrost +doubleswas posted a few days backHardCopy<{POST_SNAPBACK}>just click the link and then copy and paste it from your browser when the page loads. i searched for those, and only this topic came up lol Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
HardCopy Posted June 19, 2005 Share Posted June 19, 2005 just click the link and then copy and paste it from your browser when the page loads. i searched for those, and only this topic came up lol<{POST_SNAPBACK}>Whoops! Hmm Ok didnt realise it was that simple! silly me http://www.autoitscript.com/forum/index.ph...indpost&p=86488try thatHardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad Link to comment Share on other sites More sharing options...
DaveF Posted June 19, 2005 Share Posted June 19, 2005 By the way, if you look over to the right of this post you'll see a line that says "Post #5". If you click on that you'll get a dialog that pops up with not only the URL to this thread, but it links to this specific post... Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines. Link to comment Share on other sites More sharing options...
t0ddie Posted June 19, 2005 Author Share Posted June 19, 2005 i dont see why you cant just copy and paste from the post itself. that link that was provided, i just copied and pasted from the page, no problem. ty for the link Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
t0ddie Posted June 19, 2005 Author Share Posted June 19, 2005 (edited) well, this works good but, not the way i want it to #include <Array.au3> Dim $a_text $file = FileOpen("test.txt", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 $found = 0 $line = FileReadLine($file) If @error = -1 Then ExitLoop If IsArray($a_text) Then For $i = 0 To UBound($a_text) - 1 If ($a_text[$i] == $line) Then $found = 1 ExitLoop EndIf Next EndIf If (Not $found) Then If IsArray($a_text) Then ReDim $a_text[UBound($a_text) + 1] Else Dim $a_text[1] EndIf $a_text[UBound($a_text) - 1] = $line EndIf WEnd FileClose($file) _ArrayDisplay($a_text, "Unique") first of all, its a really nice script. i need something different though. pretty much i will have a txt file with data in it. then i want to enter stuff into the file with an inputbox. the script should check the data from the inputbox against each line from the .txt file. when it finds a duplicate to the inputbox variable, it says, you already entered that! and does not add it. otherwise it would add it. any other scripts like that? i cant figure out how to write my own. Edited June 19, 2005 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. 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