Sign in to follow this  
Followers 0
NightGaunt

A more efficient choice

3 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0