Search the Community
Showing results for tags 'searching'.
-
I have this very simple but possibly quite complicated idea for a program. It is kind of a rip of the "Find" function used in many programs and really is in a way a re-create. The problem is it take ages for the program to process the information and that is on a good PC (i5-6600, 16GB DDR4, SSD). The question, why? Why cant it work just like the find function, and how does the find function in many programs work so efficiently? Website for the words file as only allowed 4MB and it is 5MB : https://raw.githubusercontent.com/dwyl/english-words/master/words.txt Code: #include <File.au3> $Letters = InputBox("Letters","Input the letters you have.","","") If @error Then Exit $File_Words = @ScriptDir&"\words.txt" $Words = "Words:" $Amount = StringLen($Letters) $lines = _FileCountLines($File_Words) ProgressOn("Searching...","","") ProgressSet(0) For $i = 0 To $Amount $string = StringTrimRight($Letters,$i) For $j = 1 To $lines ProgressSet($lines/$j) If FileReadLine($File_Words,$j) = $string Then $Words = $Words&@CRLF&$string EndIf Next Next MsgBox(0,'',$Words)
- 6 replies
-
- searching
- word shearching
-
(and 2 more)
Tagged with: