Sign in to follow this  
Followers 0
The Kandie Man

File Search/Indexing Engine

39 posts in this topic

#1 ·  Posted (edited)

Important Note:

This source isn't just an engine, it's a fully self-contained program with its own GUI. The engines are built into the script though. Just to make sure you weren't confused that this was just an engine source.

[EDIT]

I spent a great deal of time last night (1-1-05)re-writing the engines. The indexing engine now uses 100%CPU for some time at the end of indexing the drive. The reason for this is it has to compile the index and organize it. This was made possible thanks to LxP's UDF.

The price is small compared to the increase in speed. The new indexing engine i wrote(thx to LxP) now searches an entire hardrive for file names that contain your search string in about 10 seconds!!11

The newest version of this script can be found as an attachment at this post: http://www.autoitscript.com/forum/index.ph...ndpost&p=143654

[/EDIT]

Well anyway, i did it. I wrote a search engine that is faster than the normal explorer search companion using AutoIt.

I got the idea when the explorer search companion would take forever to search my computer for files that i needed(have 5 hard drives).

[History of why i made this program]

I had already written a program that i call Audio Backup Pro that used the indexing engine to create an index of your music directory, then you could copy music onto a mp3 player and the mp3 player would be like a backup drive. If the data on your computer got deleted, my Audio Backup program would take the mp3 files that were retrieved off the mp3 player and use the index generated in the past to place the mp3 files(which are all in one folder on the mp3 player) back into the music folder in the correct directories keeping all the organization and file trees.

[/History of why i made this program]

Well, I decided to write a program using AutoIt that would index the files on your hard drives and then you could seach through all (all meaning all, including the files in the recycler and system information folders) the files on your computer in < 5 min.

After a couple days of on and off programming and help here at the support forum, i came up with this script. I have tested and haven't found really anymore bugs. If you find some, let me know and i will fix them asap.

Please tell me what you think and feel free to give me ideas on how to optimize the engine to make it faster. I am a newb programmer and any suggestions to that will improve the engines are greatly appreciated.

Also, i may add more features to the list view, but i am not really familiar with all these user made list view functions.

How it works:

1. Start it up, select the drive to index(default is all drives) and then click the rebuild index button. The time it takes to build the index varies, but it shoudn't take more than 2 hours. During the indexing, i get 20% to 40% CPU usage from this program. This should allow you to do other things while it is indexing. You may also cancel the indexing at any time by pressing the Esc key.

2. Once the index is built, you can search for a string in a any file on the computer. Simply type in the string to find in the file and click the search button. Take note that there are two search options. The Faster search option will not allow you to control the GUI because it doesn't have a GUIGetMsg() in the search engine. It will also use 100% of your CPU. If you select the slow search option, you will be able to interact with the GUI but at the price of speed. The search speed will be significantly reduced. Your processor will also be saved.

Help File has been added. Here is what it contains:

Brian's Search Engine Help

What it does:

This program is a fully operational self-contained search engine. You use it to search for strings in file names on your computer. It basically does the same thing as the Windows Explorer Search Companion, but better. This program creates indexes of all the files on your hard drive. These indexes are then scanned when you search for files on your computer. As a result, the search is much faster than that of the Explorer Search Companion. So basically, this program searches for files on your computer, but does it much faster than what you would normally use.

How to use it:

To start using it, simply click the "Rebuild Index" button on the the GUI when you run the program. This will initiate the indexing engine. It will then create an index of all files on all drives (or that drive that you selected if you didn't leave the default "All Drives" value in the drop down box selected). This can take anywhere from 10 minutes to 2 hours depending on how many files you have and how many drives you have. The indexing doesn't kill the CPU. It will use anywhere from 20% to 40% of the CPU on today's fast computers. You may cancel the indexing process at any time by selecting the Indexing window and pressing the Escape key. This will unfortunately delete all progress that the computer has made since you started the index session.

Once the index has been created, you will want to update it routinely, maybe once a week, or once a month depending on how often you move stuff around and create new files. Once an index has been created, you may also start searching for files. You can search for a file by typing in a piece of the filename into the search input control.

You then have two search options:

1.

You can do a fast search which uses 100% of your CPU and doesn't support GUI responses. So if you click the X while it is searching, nothing will happen. In order to cancel the search, you will have to press the escape key. Once you do this, the search is cancelled. You can then double click the text name of the search results and their containing folder will open.

2.

You can do a slower search which uses hardly any CPU and supports GUI responses. This means that you can double click the search results while the search is still running and it will open the file's containing folder. The search window will also respond if you click the X by closing. This is much slower though.

In addition you have yet another option. You can select what drive to search if you have multiple hard drives. Simply use the combo box provided and select the drive you wish to search.

Please keep in mind that all the search results are also stored in a text file in the same directory as the .exe. The text file is called "results.txt".

Compiled using v3.1.1.70 (beta)

An attempt to use regular AutoIt will result in failure.

Special thanks to Alex Peters aka LxP of Melbourne, Australia for help with engine design. Also to SmOke_N for helping me.

Anyway, here it is:

EDIT: This is outdated. Please see:

http://www.autoitscript.com/forum/index.php?showtopic=23815

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites



Excellent work. Here are a few things I think are worth mentioning:

  • The title of the Search window still contains 'Searching...' after the search has completed.
  • Displaying one in every (e.g.) 50 files on the status bar during a search will reduce flicker and possibly increase speed.
  • Double-clicking a file currently opens its containing folder. Using the command line explorer /select, <full path to file> will do the same and also select the file, identical to how the Open Containing Folder command of Windows' own search feature works.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks, i finally got the UDF you made to work. I didn't understand how to get it to work, but now i got it to work. :P Anyway, i will fix what you said, the only thing i don't know how to do is change a window's title. I can't fund a function to do that. I can change controls, but i can't find out how to change the actual GUI.

Does anyone here know what function to use to change the title of a GUI? I looked in the help file for a while and couldn't find anything on it.

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Thanks, it never occured to me it would be that easy. :P

[EDIT]

Spent most of last night fixing things, and i rewrote the entire indexing and search engine. Still testing it out for bugs though guys. This new indexing engine searches the drive quickly, but then takes several minutes to compile the index once it is done. It uses 100% CPU when it does this. Although this may sound bad to you, it is actually easier on your hard drive.

The up side to this is that the new search engine searches an entire drive in about 10 seconds!!!!!!!!1111111111111

I want to see someone search their entire hard drive with the search companion in 10 seconds. :lmao:

[/EDIT]

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I like what you're doing with this script. However, I have a way to speed the indexing WAYYY up.

The command is (for example)

dir c:\* /s /b /a-d > c:\indexofcdrive.txt

It uses the command prompt, and happens to be extremely fast. I indexed my d: drive, with over 80 GB of stuff on it, in 5 minutes.

The command:

dir - pretty straightforward. It gets all the files and directories within the given directory.

The drive:

c:\* - the c can be any drive (like in your script). The * means all.

The switches (these are key):

/s - search all subdirectories

/b - bare format (no heading information or summary - in other words, just the path of the file)

/a-d - the /a is attributes, -d says don't include folders.

Extra:

> c:\indexofcdrive.txt - export results into c:\indexofcdrive.txt (it can be whatever or wherever it needs to be)

Notes:

As far as I know, this prevents you from having to open every single file as you're indexing them (I'm pretty sure it doesn't open them anyway, as it seems too fast to be doing so). This is good, because it means it doesn't open files you weren't aware of.

AutoIt3 syntax:

RunWait (@ComSpec & " /c dir " & '"' & $DriveToSearch & "\*" & '"' & " /s /b /a-d > " & '"' & $ExportFile & '"', @WorkingDir, @SW_HIDE)

where $DriveToSearch is the drive without a trailing \

and $ExportFile is the name of the .txt (or .index in your case) file that you are exporting to.

Try it:

$DriveToSearch = "C:"
$ExportFile = @ScriptDir & "\IndexOfC.txt"
RunWait (@ComSpec & " /c dir " & '"' & $DriveToSearch & "\*" & '"' & " /s /b /a-d > " & '"' & $ExportFile & '"', @WorkingDir, @SW_HIDE)

Notice how much code it saves too.

Oh, and if you really wanted, since now it just spends that 5 minutes or so at high CPU with nothing on the screen, you could have your GUI window saying "Indexing, please wait...." created before the command starts, and removed when the command ends. That would help the users.

Edited by greenmachine

Share this post


Link to post
Share on other sites

I'm actually creating an indexing program myself, and use the method in the above post to index. He's right, its MUCH faster.

Share this post


Link to post
Share on other sites

BUMP you have to change script which spawn other with the /c switch. Until beta 3.1.1.99 you will get a popup telling that the /c will soon be removed for ever. Will be removed in 3.1.1.100.

Is this going to affect the way your using /c ?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Is this going to affect the way your using /c ?

I'm tempted to say no, because the /c switch is built in to the command prompt. It's a little hard to tell exactly what jpm was saying with that statement, but I think we're ok. I'll just have to check when it's removed.

If you type this code directly into the command prompt, it works the same as if you called it from AutoIt:

start cmd.exe /c dir c:  ;of course, the window will disappear too fast to really notice, so use the following line.
  start cme.exe /k dir c:  ;the /k switch tells the command prompt to stay open when it's done, which is good.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

[Edit] This problem has been resolved[/Edit]

Argh, i just wrote a new engine. Having one problem with the loop i use to index all the drives. This new indexing engine takes longer to index the drives, but like i said it is much faster at searching for files. I am having one problem though.

This is in a massive for loop. The full script is attached to this post.

$indexinput = StringSplit(StringTrimRight($indexinput, 1), @LF)
                _ArraySort($indexinput, False, 1)
                
                
                GUICtrlSetData($indexstatuslabel, "Compiling Index...")
                For $Z = 1 To $indexinput[0]
                    Local $Record = StringSplit($indexinput[$Z], @TAB)
                    If $Record[1] <> $CurrentFile Then
                        $fileoutput &= '[' & $Record[1] & ']' & @LF
                        $titleindex &= $Record[1] & @LF
                        $CurrentFile = $Record[1]
                    EndIf
                    $fileoutput &= $Record[2] & '=' & $Record[3] & @LF
                    
                    If $usercancel = "true" Then ExitLoop
                Next

I get this error:

Posted Image

Please keep in mind that the entire thing there is in a for loop. The first loop there are no problems, the next time it loops i get the error.

You can find the error on line 1309. I clear the variables, but i get that weird error. Not sure why. Any help would be appreciated.

Yes, i know this isn't the general support forum, but i am trying to keep all the stuff that has to do with this script in one thread. I will post this in the General Support forum if nobody answers.

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

This doesn't answer you most recent question, but I do have another way to greatly speed up your script.

1. Use my indexing method (dir ...) - it goes really fast, and is really useful.

2. I figured out a better way to search - do the whole file at once. What I mean by this is the following:

$SearchQuery = "autoit"
$FixedDrives = DriveGetDrive("FIXED")
For $i = 1 To $FixedDrives[0]
    $FileReadToString = FileRead (@ScriptDir & "\title" & StringTrimRight ($FixedDrives[$i], 1) & ".index")
    $StringSplit = StringSplit ($FileReadToString, @CR)
    For $j = 1 To $StringSplit[0]
        If StringInStr ($StringSplit[$j], $SearchQuery) Then
            $FileParts = StringSplit ($StringSplit[$j], "\")
            $FileName = $FileParts[$FileParts[0]]
            If StringInStr ($FileName, $SearchQuery) Then
                MsgBox (0, "Found", $StringSplit[$j])
            EndIf
        EndIf
    Next
Next

Instead of doing FileReadLine for every line down the file, which takes a while, this reads the entire file into an array split by lines, and finds files using that array. It's very quick, as surprising as that might be due to the size of the array being created.

Note: you must have the index files created by this program (or my dir command a few posts up) in your script directory. The example above will find all the files with autoit in the name and display them one-by-one in a message box.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Thanks greenmachine. I think i will add your dir method, but first i want to show you something LxP helped me with.

LxP said i should create an array as you did, the version 1.5 script uses this, but his function not only created an array it also sorted it to a file in an INI format.

LxP's function

Func AddEntry($Path, ByRef $indexinput)
; Split path into folder and file
    Local $LastSlashLoc = StringInStr($Path, '\', False, -1)
    If $LastSlashLoc = 0 Then
        SetError(1)
        Return False
    EndIf
    Local $Folder = StringLeft($Path, $LastSlashLoc)
    Local $file = StringTrimLeft($Path, $LastSlashLoc)
; Get size of file
    Local $Size = FileGetSize($Path)
    If @error Then
        SetError(2)
        Return False
    EndIf
    $indexinput &= $file & @TAB & $Folder & @TAB & $Size & @LF
EndFunc ;==>AddEntry

This writes a file to an array every time it is called. Once it has written all the files to the array, the following code sorts the array and writes it to the file in an ini format. The ini format is crucial as it speeds up the search speed tenfold. As a result of using the ini organization, a search of an entire drive takes about 10 seconds.

Here is the code it executes next:

$indexinput = StringSplit(StringTrimRight($indexinput, 1), @LF)
        _ArraySort($indexinput, False, 1)
        
        GUICtrlSetData($indexstatuslabel, "Compiling Index...")
        For $i = 1 To $indexinput[0]
            Local $Record = StringSplit($indexinput[$i], @TAB)
            If $Record[1] <> $CurrentFile Then
                $fileoutput &= '[' & $Record[1] & ']' & @LF
                $titleindex &= $Record[1] & @LF
                $CurrentFile = $Record[1]
                
            EndIf
            $fileoutput &= $Record[2] & '=' & $Record[3] & @LF
            If $usercancel = "true" Then ExitLoop
        Next

Once it does that, it writes the $fileoutput to a file and then writes the $titleindex to another file. When the engine searches, it only searches the $titleindex which contains only the names of the files. Once it finds a match in the name of the file, it then calls the $fileoutput file and does an INISeactionRead. The section is named the exact same as the filename in the other file, but keys in the sections are locations of the file and their values are equal to the filesize in bytes.

Since it only searches the filenames and not the entire path, the speed is increased significantly. The sorting of the array and the for loop above does take a while to perform. It took 20 minutes to compile the index file using the for loop and 3.5 minutes to sort it.

This took 3.5 minutes to complete:

$indexinput = StringSplit(StringTrimRight($indexinput, 1), @LF)
        _ArraySort($indexinput, False, 1)

This took 20 minutes to complete:

For $i = 1 To $indexinput[0]
            Local $Record = StringSplit($indexinput[$i], @TAB)
            If $Record[1] <> $CurrentFile Then
                $fileoutput &= '[' & $Record[1] & ']' & @LF
                $titleindex &= $Record[1] & @LF
                $CurrentFile = $Record[1]
                
            EndIf
            $fileoutput &= $Record[2] & '=' & $Record[3] & @LF
            If $usercancel = "true" Then ExitLoop
        Next

Please keep in mind though that the drive i was indexing at the time was a backup drive i have that has tons of files on it(142,244 files with huge file paths). This would probably be the maximum time it would take to execute those two scraps of code. Any ideas to speed it up would be great though. I will post an updated search engine here as well as the source.

Important! In order to compile the script you have to edit the fileinstall code which is located on line 142. You have to redirect it to the correct path of the help.htm file. For those of you that are suspicious, let me lay it out for you. This script and the .exe with it aren't malicous and there are no viruses on my computer that can edit the .exe file to make it otherwise.

I hope you enjoy. Will be making a newer version that is faster with the dir suggestion made by greenmachine. :P

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

I like the idea of splitting the file and folder names into separate files to speed the search. My paths are also enormous in some cases, so that indeed should help.

One more thing I meant to mention for a while now: it would be nice to have a label next to the index button saying when the last time the drives were indexed. You could get the time/date the index was last modified with FileGetTime, and then put it in the GUI. This way, users never really need to go into the script folder - they can do everything through the GUI.

Share this post


Link to post
Share on other sites

Good idea. I will make it so the GUI gets the date modified timestamp off the index files. It would be a little crowded on the main GUI, so i will make a button that that says, "Check index date". That would then create a msgbox with a list of drive index files with their timestamps for the time they were last modfied. That sound good?


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

Yeah I think that would work, but it would still be better if you could fit it on the main GUI part (in my opinion). You also must have put more stuff on the main GUI since 1.4, because that's what I've been working off of, and there was lots of room then. It's up to you though, I'm just trying to make suggestions and improve it. It's come in handy multiple times already, so keep it up.

Share this post


Link to post
Share on other sites

The only problem is i don't know how many drives the user may have. If the user has something like 8 drives, then it will go off the GUI i have right now. The msgbox will resize according to how many drives the user has. I could definitely fit it on the GUI, just not sure how many drives the user has. Anyway, here is an updated version with the timestamp feature.

Don't forget to update line 169. The fileinstall function will need you to put the correct location of the help.htm in order to compile.


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

If $msg = $getindextime Then
    
    $listtodisplay = ""
    
    For $count = 1 to $fixeddrives[0]
        If FileExists (@scriptdir & "\title" & StringTrimRight($fixeddrives[$count],1) & ".index") Then
            
            $listtodisplay &= "Index for drive " & StringUpper($fixeddrives[$count]) & " was last updated "
            
            $timestamp = FileGetTime(@scriptdir & "\title" & StringTrimRight($fixeddrives[$count],1) & ".index",0)
            
            $nonarraytimestamp = ""
            
            $nonarraytimestamp =  $timestamp[1] & "/" & $timestamp[2] & "/" & $timestamp[0] & " at " & $timestamp[3] & ":" & $timestamp[4] & ":"& $timestamp[5] & @CRLF
            
            $listtodisplay &= $nonarraytimestamp
        Else
            $listtodisplay &= "No index for drive " & StringUpper ($fixeddrives[$count]) & @CRLF
        EndIf
        
    Next

        $listtodisplay = StringTrimRight($listtodisplay,1)

MsgBox(64,"Index Files Last Updated:","The following index files were last updated:" & @CRLF & @CRLF & $listtodisplay)

    
Endif

Added check for index files and message just in case the index isn't in the script folder (like mine because this script was in a different folder). It's only a few lines added, but I put the whole thing so you'd know where it belongs.

Share this post


Link to post
Share on other sites

Ahh yes, forgot to add error handling in case the user didn't have an index file. Thanks, added it to the script.


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

Hi,

This is working 50X faster for indexing (most 200,000 file drives 3 minutes) using DOS and sQL now; see the Zip file including searchengine in the last link in my signature. (All those files to a "search" directory....)

Best, Randall

Edited by randallc

Share this post


Link to post
Share on other sites

Very impressive. You did some serious modifications to my script. They look very impressive. I was unable to compile it though. I include all the files required and get the following errors:

C:\AUTO it Scripts\SQL Search\sqliteExe.au3(40,56) : ERROR: $SQLITE_OK previously declared as a 'Const'
Global Const $SQLITE_OK = 0  ; /* Successful result */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(41,71) : ERROR: $SQLITE_ERROR previously declared as a 'Const'
Global Const $SQLITE_ERROR = 1  ; /* SQL error or missing database */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(42,78) : ERROR: $SQLITE_INTERNAL previously declared as a 'Const'
Global Const $SQLITE_INTERNAL = 2  ; /* An internal logic error in SQLite */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(43,65) : ERROR: $SQLITE_PERM previously declared as a 'Const'
Global Const $SQLITE_PERM = 3  ; /* Access permission denied */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(44,77) : ERROR: $SQLITE_ABORT previously declared as a 'Const'
Global Const $SQLITE_ABORT = 4  ; /* Callback routine requested an abort */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(45,68) : ERROR: $SQLITE_BUSY previously declared as a 'Const'
Global Const $SQLITE_BUSY = 5  ; /* The database file is locked */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(46,76) : ERROR: $SQLITE_LOCKED previously declared as a 'Const'
Global Const $SQLITE_LOCKED = 6  ; /* A table in the database is locked */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(47,59) : ERROR: $SQLITE_NOMEM previously declared as a 'Const'
Global Const $SQLITE_NOMEM = 7  ; /* A malloc() failed */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(48,81) : ERROR: $SQLITE_READONLY previously declared as a 'Const'
Global Const $SQLITE_READONLY = 8  ; /* Attempt to write a readonly database */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(49,88) : ERROR: $SQLITE_INTERRUPT previously declared as a 'Const'
Global Const $SQLITE_INTERRUPT = 9  ; /* Operation terminated by sqlite_interrupt() */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(50,79) : ERROR: $SQLITE_IOERR previously declared as a 'Const'
Global Const $SQLITE_IOERR = 10  ; /* Some kind of disk I/O error occurred */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(51,81) : ERROR: $SQLITE_CORRUPT previously declared as a 'Const'
Global Const $SQLITE_CORRUPT = 11  ; /* The database disk image is malformed */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(52,87) : ERROR: $SQLITE_NOTFOUND previously declared as a 'Const'
Global Const $SQLITE_NOTFOUND = 12  ; /* (Internal Only) Table or record not found */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(53,83) : ERROR: $SQLITE_FULL previously declared as a 'Const'
Global Const $SQLITE_FULL = 13  ; /* Insertion failed because database is full */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(54,78) : ERROR: $SQLITE_CANTOPEN previously declared as a 'Const'
Global Const $SQLITE_CANTOPEN = 14  ; /* Unable to open the database file */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(55,74) : ERROR: $SQLITE_PROTOCOL previously declared as a 'Const'
Global Const $SQLITE_PROTOCOL = 15  ; /* Database lock protocol error */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(56,82) : ERROR: $SQLITE_EMPTY previously declared as a 'Const'
Global Const $SQLITE_EMPTY = 16  ; /* (Internal Only) Database table is empty */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(57,71) : ERROR: $SQLITE_SCHEMA previously declared as a 'Const'
Global Const $SQLITE_SCHEMA = 17  ; /* The database schema changed */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(58,80) : ERROR: $SQLITE_TOOBIG previously declared as a 'Const'
Global Const $SQLITE_TOOBIG = 18  ; /* Too much data for one row of a table */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(59,81) : ERROR: $SQLITE_CONSTRAINT previously declared as a 'Const'
Global Const $SQLITE_CONSTRAINT = 19  ; /* Abort due to constraint violation */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(60,64) : ERROR: $SQLITE_MISMATCH previously declared as a 'Const'
Global Const $SQLITE_MISMATCH = 20  ; /* Data type mismatch */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(61,68) : ERROR: $SQLITE_MISUSE previously declared as a 'Const'
Global Const $SQLITE_MISUSE = 21  ; /* Library used incorrectly */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(62,81) : ERROR: $SQLITE_NOLFS previously declared as a 'Const'
Global Const $SQLITE_NOLFS = 22  ; /* Uses OS features not supported on host */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(63,62) : ERROR: $SQLITE_AUTH previously declared as a 'Const'
Global Const $SQLITE_AUTH = 23  ; /* Authorization denied */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(64,77) : ERROR: $SQLITE_ROW previously declared as a 'Const'
Global Const $SQLITE_ROW = 100  ; /* sqlite_step() has another row ready */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(65,79) : ERROR: $SQLITE_DONE previously declared as a 'Const'
Global Const $SQLITE_DONE = 101  ; /* sqlite_step() has finished executing */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(66,86) : ERROR: $SQLITE_DBHANDLE previously declared as a 'Const'
Global Const $SQLITE_DBHANDLE = 1 ; /* (Internal Only) Database Handle (sqlite3*) */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqliteExe.au3(67,91) : ERROR: $SQLITE_QUERYHANDLE previously declared as a 'Const'
Global Const $SQLITE_QUERYHANDLE = 2 ; /* (Internal Only) Query Handle (sqlite3_stmt*) */
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\sqlite.au3(918,68) : ERROR: _ArraySearch(): undefined function.
    ElseIf _ArraySearch ($g_avSafeMode_SQLite[$iHandleType], $hGeneric)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\SQL_View.au3(384,23) : ERROR: _IsPressed(): undefined function.
                If _IsPressed('11')
                ~~~~~~~~~~~~~~~~~~^
C:\AUTO it Scripts\SQL Search\SearchEngine.au3 - 30 error(s), 0 warning(s)

Don't know what that is all about? Any suggestions on how to compile it? I unzipped all the sql files to the script directory and there are no include errors.

I was also busy modifying my engine as well. I included the most recent version below. Just use the old help.htm when compiling it.(can be found in zips in previous posts)


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

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