Shakala Posted June 7, 2010 Share Posted June 7, 2010 (edited) What i have so far is.... #include <Array.au3> #include <FF.au3> #include <File.au3> Func Searching() $SourceCode = _FFReadHTML("html", 7) ; Reads the source code of a website Sleep(200) FileDelete($TextFileName) ; Deletes a file Sleep(200) $SouceText = StringSplit($SourceCode, '<fieldset><legend>Name', 1) ;Splits the source at "Name" Sleep(200) FileWrite($TextFileName, $SouceText[2]) ; Rewrites it and saves the text after "Name" $Age = IniReadSection("Ages.ini", "Ages") ; Reads the INI For $i = 1 To $age[0][0] ; Starts the for loop reading every value for age $SearchResults = StringInStr($SouceText[2], $age[$i][1], 0) ;checks if any of the ages is = to one of the ages in the source code Sleep(50) If $SearchResults > 0 Then ; If it finds it, then AddIgnoreList() ;and it will add that line to the ignore list DOTHIS() ; It will run another function ExitLoop EndIf Next endFunc Func AddIgnoreList() EndFunc Im sure its a easy solution, but its kinda late here and im not really thinkin straight haha. So how would i get it to add the text that matched in both to a ignore list so that when i run it again, it would skip over that text? (The html code keeps refreshing with new information added to it, and i need this ignore list to filter out what it previously had found.) ~Shakala ps: Since it is a private site, and the rest of the code is private, this is all i can give, If you have ideas, but aren't positive if they will work, post them anyways, ill give them a test and reply back. Edited June 7, 2010 by Shakala Link to comment Share on other sites More sharing options...
99ojo Posted June 7, 2010 Share Posted June 7, 2010 Hi, if i catch you right, you want to save $SouceText[2] into an ignore list. 1) Save your ignore list into a file. 2) Read this file into an array. -> _FileListToArray () 3) Perform a search over the array, to check, if the line string is in the array. -> _ArraySearch () 4) If not in array, perform your $SearchResults..... If you find the string, add this line to your ignore list and do an _ArrayAdd ($arignore, FileReadLine ("ignore.txt", -1)) -> Read Last Line from ignore.txt and put value into ignore array for later or more comparisons. This might helps you for further coding...... ;-)) Stefan P.S: This is all i will give you........ Link to comment Share on other sites More sharing options...
Shakala Posted June 9, 2010 Author Share Posted June 9, 2010 Hi, if i catch you right, you want to save $SouceText[2] into an ignore list. 1) Save your ignore list into a file. 2) Read this file into an array. -> _FileListToArray () 3) Perform a search over the array, to check, if the line string is in the array. -> _ArraySearch () 4) If not in array, perform your $SearchResults..... If you find the string, add this line to your ignore list and do an _ArrayAdd ($arignore, FileReadLine ("ignore.txt", -1)) -> Read Last Line from ignore.txt and put value into ignore array for later or more comparisons. This might helps you for further coding...... ;-)) Stefan P.S: This is all i will give you........ eck, lol thanks. ~Shakala 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