Hello, First this form is great, I've gotten so much done today with just the help files and examples here. So please if you know a help file I can use, let me know. _ArrayExtract is what i'm thinking will work.
What i'm doing: I'm getting a list of files whose name contains ".url", putting the full path to an Array, then i'm taking those files and joining all the files into 1 file. What I want to do now, is from that master file I created, I want to extract only lines whose it contains "URL".
#Include <File.au3>
#Include <Array.au3>
$fileout = "C:\Users\Good Stuff\out.txt"
$sAutoItDir = "C:\Users\Store Bookmarks"
if FileExists($fileout) then FileDelete($fileout)
$file = FileOpen($fileout, 1)
$aArray = _FileListToArrayRec($sAutoItDir, "*.url", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_NOSORT, $FLTAR_FULLPATH)
for $i = 1 to $aArray[0]
$data = FileRead($aArray[$i])
FileWrite($file, "-------------------- File: "&$aArray[$i]&"--------------------------------"&@crlf)
FileWrite($file, $data&@CRLF)
Next
; Define a variable to pass to _FileReadToArray.
Local $aArray = 0
If Not _FileReadToArray($fileout, $aArray, 0) Then
MsgBox($MB_SYSTEMMODAL, "", "There was an error reading the file. @error: " & @error) ; An error occurred reading the current script file.
EndIf
; Display the array in _ArrayDisplay.
_ArrayDisplay($aArray)
;Here I want to create a variable and set it to the value of an array whose consists of only lines that have URL, extracted from the master file i loaded into an array.
;$extractedArray = _ArrayExtract($aArray, "URL=", "URL=")
;_ArrayDisplay($extractedArray)
FileClose($file)
;ShellExecute($fileout)
Everything works the way I want it to, up until extracting lines whose it contains URL from the "master file" array I made.
Hoping someone can point me in the right direction. Also I just started autoit today so if you see other issues please feel free to point them out to me.