NightGaunt Posted September 28, 2007 Share Posted September 28, 2007 Alright is there a more efficient way to search in auto-it? I've been using outside programs and letting them write out in to auto-it. But if there is a more efficient way to do the serach, inside of auto-it I'd be happy to use that. As an example, here is the best I have come up with in terms of searching in Auto-It. Granted the search I was performing was only two directories deep, so it was simple to do. But if I needed to search the system, is there a way to do that quickly and easily in Auto-it, or should I still call outside programs and write the data with StdoutRead? CODE $search = FileFindFirstFile($Directory & $Date & "*") While 1 $file = FileFindNextFile($search) ExitLoop WEnd FileClose($search) $Directory = $Directory & $File $Search = FileFindFirstFile($Directory & "\*.*") While 1 $File = FileFindNextFile($Search) $Search2 = FileFindFirstFile($Directory & "\" & $File & "\engietru.reg") if $Search2 > -1 then ExitLoop WEnd $Path = $Directory & "\" & $File & "\engietru.reg" FileCLose($search) FIleClose($Search2) Msgbox(0,"Here we go", $Path) "I have discovered that all human evil comes from this, man's being unable to sit still in a room. " - Blaise Pascal Link to comment Share on other sites More sharing options...
jvanegmond Posted September 28, 2007 Share Posted September 28, 2007 First of all, it's AutoIt. Secondly, _FileListToArray is similar to using Dir with the /B Switch. So, that would be a whole lot faster. github.com/jvanegmond Link to comment Share on other sites More sharing options...
randallc Posted September 28, 2007 Share Posted September 28, 2007 First of all, it's AutoIt. Secondly, _FileListToArray is similar to using Dir with the /B Switch. So, that would be a whole lot faster. Hi, Easier, not faster; someone else pointed out thta large lists are slow in this UDF at present due to repeated redim; ReDim $asFileList[UBound($asFileList) + 1]try the new udf in my signature link.. Best, randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW 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