Jump to content

neoSearch 1.86


KJohn
 Share

Recommended Posts

  • Replies 256
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Anyway, since you are not the 4th voter by your own admission; and I'm certain you are not one of the first three since the number of ratings has stood at three for quite some time now, please register yourself as the 5th rater since you are familiar with the program and extremely familiar with this thread... :)

OK, I just rated it. I was the 8th rater and I gave it 4 stars based on my impression of the application itself. Not the author or this thread (which aren't so bad themselves, but hey).

See ya'!

Edit: Grammar.

Edited by fowmow
Link to comment
Share on other sites

Hi,

This seems to work; your tble in a text file to read; then;

; koshytext.au3
#include <Array.au3>
local $fileread=FileRead(@ScriptDir&"\koshy2.txt"); table in text document for example
local $Start="<table>"&@crlf&"    <tr>"&@crlf&"        <td>",$iStartLen=StringLen($Start)+1
local $End="</td>"&@crlf&"    </tr>"&@crlf&"</table>",$iEndLen=StringLen($End)
$fileread=StringMid($fileread,$iStartLen,stringlen($fileread)-$iEndLen-$iStartLen)
local $sLineSplit="</td>"&@crlf&"    </tr>"&@crlf&"    <tr>"&@crlf&"        <td>"
local $sItemSplit="</td>"&@crlf&"        <td>"
$fileread=StringReplace($fileread,$sLineSplit,@LF)
$fileread=StringReplace($fileread,$sItemSplit,"|")
local $ar_FileRead=StringSplit($fileread,@LF)
local $Header=$ar_FileRead[1]
$ar_FileRead[0]=$ar_FileRead[UBound($ar_FileRead)-1]
$ar_FileRead[1]=$ar_FileRead[UBound($ar_FileRead)-2]
redim $ar_FileRead[UBound($ar_FileRead)-2]
_Array2D1DFieldSortSt( $ar_FileRead, "-2"); 1D must be "|" delimited!;_Array2D1DFieldSortSt(ByRef $arEither2D1D, $iIndex = "1",$icase=0); 1D must be "|" delimited!
local $FileWrite=$Header&@LF&_ArrayToString($ar_FileRead,@LF)
$FileWrite=StringReplace($FileWrite,@LF,$sLineSplit)
$FileWrite=$Start&StringReplace($FileWrite,"|",$sItemSplit)&$End
MsgBox(0,"",$FileWrite)
Func _Array2D1DFieldSortSt(ByRef $arEither2D1D, $iIndex = "1",$icase=0); 1D must be "|" delimited!
    Local $code = 'function SubSort( byref arSingle,iIndex,icase)'
    $code &= @LF & '    arIndexN=split(iIndex,"|")'
    $code &= @LF & '    dim iAsc:iAsc=0'
    $code &= @LF & '    if arIndexN(0)<0 then iAsc=1'
    $code &= @LF & '    dim arIndex()'
    $code &= @LF & '    redim preserve arIndex(1)';:arIndex(1) =0
    $code &= @LF & '    for a= 0 to ubound(arIndexN)'
    $code &= @LF & '        arIndexN(a)=csng(arIndexN(a))'
    $code &= @LF & '        if arIndexN(a)<>"" and arIndexN(a)<>0 then'
    $code &= @LF & '            redim preserve arIndex(a)'
    $code &= @LF & '            arIndex(a)=abs(arIndexN(a))-1'
    $code &= @LF & '            arIndexN(a)=csng(Iif(arIndexN(a)<0,arIndexN(a)+1,arIndexN(a)-1))'
    $code &= @LF & '        End If'
    $code &= @LF & '    next'
    $code &= @LF & '    ArraySort arSingle, iAsc,  0, UBound(arSingle), arIndex(0),icase  ';SortArray, iAsc,First, Last,iViewColNum
    $code &= @LF & '    for indexcol=1 to ubound(arIndex)';col=2'; start with check on 2nd  index'; define first index as col 1 (in call, 1)
    $code &= @LF & '        SubSort1 arSingle,arIndex,indexcol,iif(arIndexN(indexcol)<0,-1,1),icase  ';->, sort order
    $code &= @LF & '    Next'
    $code &= @LF & '    SubSort=arSingle'
    $code &= @LF & 'end function   ';==>ArrayFieldSort
    $code &= @LF & 'function SubSort1(byref arArray,arIndex,indexcol, iAsc,icase)'
    $code &= @LF & '    dim Row,col:col=arIndex(indexcol)'
    $code &= @LF & '    dim pcol:pcol=arIndex(indexcol-1)'
    $code &= @LF & '    iAsc=Iif(iAsc<0,1,0)'
    $code &= @LF & '    dim arTemp(),itemp, sMarker:sMarker="Equal"';,sTemp(1)
    $code &= @LF & '    redim preserve arTemp(1) ';redim extra row
    $code &= @LF & '    for Row=1 to UBound(arArray) '; go through all rows of 2d array in that column to check for dupes
    $code &= @LF & '            arRow=split(arArray(row),"|")'
    $code &= @LF & '            arRowB4=split(arArray(row-1),"|")'
    $code &= @LF & '        if indexcol>1 then ';check cols in each row first if more than 2 index cols
    $code &= @LF & '            for c=0 to indexcol-1'
    $code &= @LF & '                if lcase(arRow(arIndex(c)))<>lcase(arRowB4(arIndex(c))) Then'
    $code &= @LF & '                    sMarker="pColsNotEqual"'
    $code &= @LF & '                    c=indexcol'
    $code &= @LF & '                End If'
    $code &= @LF & '            Next'
    $code &= @LF & '        End If'
    $code &= @LF & '        if lcase(arRow(pcol))=lcase(arRowB4(pcol)) and sMarker="Equal" Then ';dupes in the prev col.
    $code &= @LF & '            arTemp(itemp)=arArray(row-1)';Array2DToD( arArray2d,"",0,row-1,1) '; set first line of new potential sort array
    $code &= @LF & '            redim preserve arTemp(itemp+1) ';redim extra row
    $code &= @LF & '            arTemp(itemp+1)=arArray(row)';Array2DToD( arArray2d,"",0,row-1,1) '; set first line of new potential sort array
    $code &= @LF & '            itemp=itemp+1'
    $code &= @LF & '        Else'
    $code &= @LF & '            sMarker="Equal"'
    $code &= @LF & '            SubSortDo1 arArray,arTemp,itemp,iAsc,col,row,icase'
    $code &= @LF & '        End If'
    $code &= @LF & '    Next'
    $code &= @LF & '    SubSortDo1 arArray,arTemp,itemp,iAsc,col,row,icase'
    $code &= @LF & 'end function   '
    $code &= @LF & 'function SubSortDo1(byref arArray,byref arTemp,byref itemp,iAsc,col,row,icase)'
    $code &= @LF & '    dim sTemp()'
    $code &= @LF & '    if itemp>0 then'
    $code &= @LF & '        ArraySort arTemp,  iAsc,0, UBound(arTemp), col ,icase';sort on current col (pcol+1), asc?
    $code &= @LF & '        for i= 0 to ubound(arTemp)'
    $code &= @LF & '            arArray(row-ubound(arTemp)+i-1)=arTemp(i)'
    $code &= @LF & '        Next'
    $code &= @LF & '    End If'
    $code &= @LF & '    redim preserve arTemp(1)'
    $code &= @LF & '    itemp=0'; change backto single, then get into 2d array properly, then go on to check next line'; row=row-1??
    $code &= @LF & '    SubSortDo1= SortArray'
    $code &= @LF & 'end function'
    $code &= @LF & 'Function IIf( expr, truepart, falsepart )'
    $code &= @LF & '   IIf = falsepart'
    $code &= @LF & '   If expr Then IIf = truepart'''
    $code &= @LF & 'End Function'
    $code &= @LF & 'function ArraySort(ByRef SortArray, iAsc,First, Last,iViewColNum,icase)'
    $code &= @LF & '    dim strWrite,arCol,arColumn()'
    $code &= @LF & '    ReDim Preserve arColumn(ubound(SortArray))'
    $code &= @LF & '    Dim intPointer, booIsNumeric: booIsNumeric = True'
    $code &= @LF & '    For intPointer = First To Last'
    $code &= @LF & '        arCol = Split( SortArray(intPointer), "|", -1,0 )'
    $code &= @LF & '        If Not IsNumeric( arCol(iViewColNum) ) Then'
    $code &= @LF & '            booIsNumeric = False'
    $code &= @LF & '            Exit For'
    $code &= @LF & '        End If'
    $code &= @LF & '    Next'
    $code &= @LF & '    For intPointer = First To Last'
    $code &= @LF & '        arCol = Split( SortArray(intPointer), "|", -1,0 )'
    $code &= @LF & '        If booIsNumeric Then'
    $code &= @LF & '            arColumn(intPointer)  = CSng( arCol(iViewColNum) )'
    $code &= @LF & '        else'
    $code &= @LF & '            arColumn(intPointer)  =  arCol(iViewColNum)'
    $code &= @LF & '        End If'
    $code &= @LF & '    Next'
    $code &= @LF & '    if not icase then  QuickSortColumn  SortArray, arColumn,First, Last,iViewColNum'
    $code &= @LF & '    if icase or booIsNumeric then QuickSortColumnCase  SortArray, arColumn,First, Last,iViewColNum'
    $code &= @LF & '    if iasc=1 then ReverseElements SortArray, 0, ubound(SortArray)'
    $code &= @LF & '    ArraySort= SortArray'
    $code &= @LF & 'End function   '
    $code &= @LF & 'function QuickSortColumn(ByRef SortArray, ByRef arColumn, First, Last,iViewColNum)'
    $code &= @LF & '    dim Low,High,collitem,arCol'
    $code &= @LF & '    dim Temp,ListSeparator'
    $code &= @LF & '    Low = First'
    $code &= @LF & '    High = Last'
    $code &= @LF & '    ListSeparator=arColumn((First + Last) / 2)'
    $code &= @LF & '    Do'
    $code &= @LF & '        While lcase(arColumn(Low)) < lcase(ListSeparator)'
    $code &= @LF & '            Low = Low + 1'
    $code &= @LF & '        WEnd'
    $code &= @LF & '        While lcase(arColumn(High)) > lcase(ListSeparator)'
    $code &= @LF & '            High = High - 1'
    $code &= @LF & '        WEnd'
    $code &= @LF & '        If (Low <= High) Then'
    $code &= @LF & '            Temp = SortArray(Low)'
    $code &= @LF & '            SortArray(Low) = SortArray(High)'
    $code &= @LF & '            SortArray(High) = Temp'
    $code &= @LF & '            Temp = arColumn(Low)'
    $code &= @LF & '            arColumn(Low) = arColumn(High)'
    $code &= @LF & '            arColumn(High) = Temp'
    $code &= @LF & '            Low = Low + 1'
    $code &= @LF & '            High = High - 1'
    $code &= @LF & '        End If'
    $code &= @LF & '    Loop While (Low <= High)'
    $code &= @LF & '    If (First < High) Then QuickSortColumn  SortArray, arColumn,First, High,iViewColNum '
    $code &= @LF & '    If (Low < Last) Then QuickSortColumn  SortArray, arColumn,Low, Last,iViewColNum '
    $code &= @LF & 'End function   '
    $code &= @LF & 'function QuickSortColumnCase(ByRef SortArray, ByRef arColumn, First, Last,iViewColNum)'
    $code &= @LF & '    dim Low,High,collitem,arCol'
    $code &= @LF & '    dim Temp,ListSeparator'
    $code &= @LF & '    Low = First'
    $code &= @LF & '    High = Last'
    $code &= @LF & '    ListSeparator=arColumn((First + Last) / 2)'
    $code &= @LF & '    Do'
    $code &= @LF & '        While (arColumn(Low) < ListSeparator)'
    $code &= @LF & '            Low = Low + 1'
    $code &= @LF & '        WEnd'
    $code &= @LF & '        While (arColumn(High) > ListSeparator)'
    $code &= @LF & '            High = High - 1'
    $code &= @LF & '        WEnd'
    $code &= @LF & '        If (Low <= High) Then'
    $code &= @LF & '            Temp = SortArray(Low)'
    $code &= @LF & '            SortArray(Low) = SortArray(High)'
    $code &= @LF & '            SortArray(High) = Temp'
    $code &= @LF & '            Temp = arColumn(Low)'
    $code &= @LF & '            arColumn(Low) = arColumn(High)'
    $code &= @LF & '            arColumn(High) = Temp'
    $code &= @LF & '            Low = Low + 1'
    $code &= @LF & '            High = High - 1'
    $code &= @LF & '        End If'
    $code &= @LF & '    Loop While (Low <= High)'
    $code &= @LF & '    If (First < High) Then QuickSortColumnCase  SortArray, arColumn,First, High,iViewColNum '
    $code &= @LF & '    If (Low < Last) Then QuickSortColumnCase  SortArray, arColumn,Low, Last,iViewColNum '
    $code &= @LF & 'End function   '
    $code &= @LF & 'Sub ReverseElements( arrToReverse, intAlphaRow, intOmegaRow )'
    $code &= @LF & '    Dim intPointer, intUpper, intLower, varHolder'
    $code &= @LF & '    For intPointer = 0 To Int( (intOmegaRow - intAlphaRow) / 2 )'
    $code &= @LF & '        intUpper = intAlphaRow + intPointer'
    $code &= @LF & '        intLower = intOmegaRow - intPointer'
    $code &= @LF & '        varHolder = arrToReverse(intLower)'
    $code &= @LF & '        arrToReverse(intLower) = arrToReverse(intUpper)'
    $code &= @LF & '        arrToReverse(intUpper) = varHolder'
    $code &= @LF & '    Next'
    $code &= @LF & 'End Sub'
    Local $vbs = ObjCreate("ScriptControl")
    $vbs.language = "vbscript"
    $vbs.Timeout = -1
    $vbs.addcode ($code)
;~  FileWrite(@ScriptDir&"\subsort.vbs",$code)
    $arEither2D1D = $vbs.Run("SubSort", $arEither2D1D, $iIndex,$icase)
    $vbs = ""
EndFunc   ;==>_Array2D1DFieldSortSt
Best, Randall

[if you want it to work in win9x, you can't use this sort; but this shows how to parse it and fastest sort; change to 2D array and use autoit sort would be OK; there are some speed up algorithms for that too if its too slow...]

Edited by randallc
Link to comment
Share on other sites

@Koshy John

Why make your own indexing system, while windows has it all natively.

No overhead needed : MS indexing Service

regards,

ptrex

1. neoSearch is designed to be a complete replacement to the native indexing service... The indexing service does have a noticable overhead (especially noticable when you start using an idle machine; hard disk thrashing) on Windows XP (not so much on Vista, I think).

2. What's the fun in coding if you are going to use other ppl's code.. I create software only when I find the problem challenging enough (I think I've done a good job with this one overall). That attitude of mine will have to change once I join a commercial company as a coder but I'm not there yet! :)

Maybe I'll give users the option of using the internal neoSearch index versus the Windows index ... but that doesn't seem likely to materialise any time soon with my present work load...

Link to comment
Share on other sites

KJ is a good person, and a good programmer :)

(Just had to put that out there)

Anyway, i tried neoSearch when you first developed it, but i can't test right now, so judging from that, Great job on this program.

I'm thankful for users like you who take their time to tell me the program is good! People are more likely to get back to me if things are not upto their expectations... but rarely... very rarely if the program does its job well... Thanks again!

OK, I just rated it. I was the 8th rater and I gave it 4 stars based on my impression of the application itself. Not the author or this thread (which aren't so bad themselves, but hey).

See ya'!

Edit: Grammar.

Thank you! Your stars were the hardest to earn I guess... ;)
Link to comment
Share on other sites

Hi,

This seems to work; your tble in a text file to read; then;

; koshytext.au3
#include <Array.au3>
local $fileread=FileRead(@ScriptDir&"\koshy2.txt"); table in text document for example
local $Start="<table>"&@crlf&"    <tr>"&@crlf&"        <td>",$iStartLen=StringLen($Start)+1
local $End="</td>"&@crlf&"    </tr>"&@crlf&"</table>",$iEndLen=StringLen($End)
$fileread=StringMid($fileread,$iStartLen,stringlen($fileread)-$iEndLen-$iStartLen)
local $sLineSplit="</td>"&@crlf&"    </tr>"&@crlf&"    <tr>"&@crlf&"        <td>"
local $sItemSplit="</td>"&@crlf&"        <td>"
$fileread=StringReplace($fileread,$sLineSplit,@LF)
$fileread=StringReplace($fileread,$sItemSplit,"|")
local $ar_FileRead=StringSplit($fileread,@LF)
local $Header=$ar_FileRead[1]
$ar_FileRead[0]=$ar_FileRead[UBound($ar_FileRead)-1]
$ar_FileRead[1]=$ar_FileRead[UBound($ar_FileRead)-2]
redim $ar_FileRead[UBound($ar_FileRead)-2]
_Array2D1DFieldSortSt( $ar_FileRead, "-2"); 1D must be "|" delimited!;_Array2D1DFieldSortSt(ByRef $arEither2D1D, $iIndex = "1",$icase=0); 1D must be "|" delimited!
local $FileWrite=$Header&@LF&_ArrayToString($ar_FileRead,@LF)
$FileWrite=StringReplace($FileWrite,@LF,$sLineSplit)
$FileWrite=$Start&StringReplace($FileWrite,"|",$sItemSplit)&$End
MsgBox(0,"",$FileWrite)
Func _Array2D1DFieldSortSt(ByRef $arEither2D1D, $iIndex = "1",$icase=0); 1D must be "|" delimited!
    Local $code = 'function SubSort( byref arSingle,iIndex,icase)'
    $code &= @LF & '    arIndexN=split(iIndex,"|")'
    $code &= @LF & '    dim iAsc:iAsc=0'
    $code &= @LF & '    if arIndexN(0)<0 then iAsc=1'
    $code &= @LF & '    dim arIndex()'
    $code &= @LF & '    redim preserve arIndex(1)';:arIndex(1) =0
    $code &= @LF & '    for a= 0 to ubound(arIndexN)'
    $code &= @LF & '        arIndexN(a)=csng(arIndexN(a))'
    $code &= @LF & '        if arIndexN(a)<>"" and arIndexN(a)<>0 then'
    $code &= @LF & '            redim preserve arIndex(a)'
    $code &= @LF & '            arIndex(a)=abs(arIndexN(a))-1'
    $code &= @LF & '            arIndexN(a)=csng(Iif(arIndexN(a)<0,arIndexN(a)+1,arIndexN(a)-1))'
    $code &= @LF & '        End If'
    $code &= @LF & '    next'
    $code &= @LF & '    ArraySort arSingle, iAsc,  0, UBound(arSingle), arIndex(0),icase  ';SortArray, iAsc,First, Last,iViewColNum
    $code &= @LF & '    for indexcol=1 to ubound(arIndex)';col=2'; start with check on 2nd  index'; define first index as col 1 (in call, 1)
    $code &= @LF & '        SubSort1 arSingle,arIndex,indexcol,iif(arIndexN(indexcol)<0,-1,1),icase  ';->, sort order
    $code &= @LF & '    Next'
    $code &= @LF & '    SubSort=arSingle'
    $code &= @LF & 'end function   ';==>ArrayFieldSort
    $code &= @LF & 'function SubSort1(byref arArray,arIndex,indexcol, iAsc,icase)'
    $code &= @LF & '    dim Row,col:col=arIndex(indexcol)'
    $code &= @LF & '    dim pcol:pcol=arIndex(indexcol-1)'
    $code &= @LF & '    iAsc=Iif(iAsc<0,1,0)'
    $code &= @LF & '    dim arTemp(),itemp, sMarker:sMarker="Equal"';,sTemp(1)
    $code &= @LF & '    redim preserve arTemp(1) ';redim extra row
    $code &= @LF & '    for Row=1 to UBound(arArray) '; go through all rows of 2d array in that column to check for dupes
    $code &= @LF & '            arRow=split(arArray(row),"|")'
    $code &= @LF & '            arRowB4=split(arArray(row-1),"|")'
    $code &= @LF & '        if indexcol>1 then ';check cols in each row first if more than 2 index cols
    $code &= @LF & '            for c=0 to indexcol-1'
    $code &= @LF & '                if lcase(arRow(arIndex(c)))<>lcase(arRowB4(arIndex(c))) Then'
    $code &= @LF & '                    sMarker="pColsNotEqual"'
    $code &= @LF & '                    c=indexcol'
    $code &= @LF & '                End If'
    $code &= @LF & '            Next'
    $code &= @LF & '        End If'
    $code &= @LF & '        if lcase(arRow(pcol))=lcase(arRowB4(pcol)) and sMarker="Equal" Then ';dupes in the prev col.
    $code &= @LF & '            arTemp(itemp)=arArray(row-1)';Array2DToD( arArray2d,"",0,row-1,1) '; set first line of new potential sort array
    $code &= @LF & '            redim preserve arTemp(itemp+1) ';redim extra row
    $code &= @LF & '            arTemp(itemp+1)=arArray(row)';Array2DToD( arArray2d,"",0,row-1,1) '; set first line of new potential sort array
    $code &= @LF & '            itemp=itemp+1'
    $code &= @LF & '        Else'
    $code &= @LF & '            sMarker="Equal"'
    $code &= @LF & '            SubSortDo1 arArray,arTemp,itemp,iAsc,col,row,icase'
    $code &= @LF & '        End If'
    $code &= @LF & '    Next'
    $code &= @LF & '    SubSortDo1 arArray,arTemp,itemp,iAsc,col,row,icase'
    $code &= @LF & 'end function   '
    $code &= @LF & 'function SubSortDo1(byref arArray,byref arTemp,byref itemp,iAsc,col,row,icase)'
    $code &= @LF & '    dim sTemp()'
    $code &= @LF & '    if itemp>0 then'
    $code &= @LF & '        ArraySort arTemp,  iAsc,0, UBound(arTemp), col ,icase';sort on current col (pcol+1), asc?
    $code &= @LF & '        for i= 0 to ubound(arTemp)'
    $code &= @LF & '            arArray(row-ubound(arTemp)+i-1)=arTemp(i)'
    $code &= @LF & '        Next'
    $code &= @LF & '    End If'
    $code &= @LF & '    redim preserve arTemp(1)'
    $code &= @LF & '    itemp=0'; change backto single, then get into 2d array properly, then go on to check next line'; row=row-1??
    $code &= @LF & '    SubSortDo1= SortArray'
    $code &= @LF & 'end function'
    $code &= @LF & 'Function IIf( expr, truepart, falsepart )'
    $code &= @LF & '   IIf = falsepart'
    $code &= @LF & '   If expr Then IIf = truepart'''
    $code &= @LF & 'End Function'
    $code &= @LF & 'function ArraySort(ByRef SortArray, iAsc,First, Last,iViewColNum,icase)'
    $code &= @LF & '    dim strWrite,arCol,arColumn()'
    $code &= @LF & '    ReDim Preserve arColumn(ubound(SortArray))'
    $code &= @LF & '    Dim intPointer, booIsNumeric: booIsNumeric = True'
    $code &= @LF & '    For intPointer = First To Last'
    $code &= @LF & '        arCol = Split( SortArray(intPointer), "|", -1,0 )'
    $code &= @LF & '        If Not IsNumeric( arCol(iViewColNum) ) Then'
    $code &= @LF & '            booIsNumeric = False'
    $code &= @LF & '            Exit For'
    $code &= @LF & '        End If'
    $code &= @LF & '    Next'
    $code &= @LF & '    For intPointer = First To Last'
    $code &= @LF & '        arCol = Split( SortArray(intPointer), "|", -1,0 )'
    $code &= @LF & '        If booIsNumeric Then'
    $code &= @LF & '            arColumn(intPointer)  = CSng( arCol(iViewColNum) )'
    $code &= @LF & '        else'
    $code &= @LF & '            arColumn(intPointer)  =  arCol(iViewColNum)'
    $code &= @LF & '        End If'
    $code &= @LF & '    Next'
    $code &= @LF & '    if not icase then  QuickSortColumn  SortArray, arColumn,First, Last,iViewColNum'
    $code &= @LF & '    if icase or booIsNumeric then QuickSortColumnCase  SortArray, arColumn,First, Last,iViewColNum'
    $code &= @LF & '    if iasc=1 then ReverseElements SortArray, 0, ubound(SortArray)'
    $code &= @LF & '    ArraySort= SortArray'
    $code &= @LF & 'End function   '
    $code &= @LF & 'function QuickSortColumn(ByRef SortArray, ByRef arColumn, First, Last,iViewColNum)'
    $code &= @LF & '    dim Low,High,collitem,arCol'
    $code &= @LF & '    dim Temp,ListSeparator'
    $code &= @LF & '    Low = First'
    $code &= @LF & '    High = Last'
    $code &= @LF & '    ListSeparator=arColumn((First + Last) / 2)'
    $code &= @LF & '    Do'
    $code &= @LF & '        While lcase(arColumn(Low)) < lcase(ListSeparator)'
    $code &= @LF & '            Low = Low + 1'
    $code &= @LF & '        WEnd'
    $code &= @LF & '        While lcase(arColumn(High)) > lcase(ListSeparator)'
    $code &= @LF & '            High = High - 1'
    $code &= @LF & '        WEnd'
    $code &= @LF & '        If (Low <= High) Then'
    $code &= @LF & '            Temp = SortArray(Low)'
    $code &= @LF & '            SortArray(Low) = SortArray(High)'
    $code &= @LF & '            SortArray(High) = Temp'
    $code &= @LF & '            Temp = arColumn(Low)'
    $code &= @LF & '            arColumn(Low) = arColumn(High)'
    $code &= @LF & '            arColumn(High) = Temp'
    $code &= @LF & '            Low = Low + 1'
    $code &= @LF & '            High = High - 1'
    $code &= @LF & '        End If'
    $code &= @LF & '    Loop While (Low <= High)'
    $code &= @LF & '    If (First < High) Then QuickSortColumn  SortArray, arColumn,First, High,iViewColNum '
    $code &= @LF & '    If (Low < Last) Then QuickSortColumn  SortArray, arColumn,Low, Last,iViewColNum '
    $code &= @LF & 'End function   '
    $code &= @LF & 'function QuickSortColumnCase(ByRef SortArray, ByRef arColumn, First, Last,iViewColNum)'
    $code &= @LF & '    dim Low,High,collitem,arCol'
    $code &= @LF & '    dim Temp,ListSeparator'
    $code &= @LF & '    Low = First'
    $code &= @LF & '    High = Last'
    $code &= @LF & '    ListSeparator=arColumn((First + Last) / 2)'
    $code &= @LF & '    Do'
    $code &= @LF & '        While (arColumn(Low) < ListSeparator)'
    $code &= @LF & '            Low = Low + 1'
    $code &= @LF & '        WEnd'
    $code &= @LF & '        While (arColumn(High) > ListSeparator)'
    $code &= @LF & '            High = High - 1'
    $code &= @LF & '        WEnd'
    $code &= @LF & '        If (Low <= High) Then'
    $code &= @LF & '            Temp = SortArray(Low)'
    $code &= @LF & '            SortArray(Low) = SortArray(High)'
    $code &= @LF & '            SortArray(High) = Temp'
    $code &= @LF & '            Temp = arColumn(Low)'
    $code &= @LF & '            arColumn(Low) = arColumn(High)'
    $code &= @LF & '            arColumn(High) = Temp'
    $code &= @LF & '            Low = Low + 1'
    $code &= @LF & '            High = High - 1'
    $code &= @LF & '        End If'
    $code &= @LF & '    Loop While (Low <= High)'
    $code &= @LF & '    If (First < High) Then QuickSortColumnCase  SortArray, arColumn,First, High,iViewColNum '
    $code &= @LF & '    If (Low < Last) Then QuickSortColumnCase  SortArray, arColumn,Low, Last,iViewColNum '
    $code &= @LF & 'End function   '
    $code &= @LF & 'Sub ReverseElements( arrToReverse, intAlphaRow, intOmegaRow )'
    $code &= @LF & '    Dim intPointer, intUpper, intLower, varHolder'
    $code &= @LF & '    For intPointer = 0 To Int( (intOmegaRow - intAlphaRow) / 2 )'
    $code &= @LF & '        intUpper = intAlphaRow + intPointer'
    $code &= @LF & '        intLower = intOmegaRow - intPointer'
    $code &= @LF & '        varHolder = arrToReverse(intLower)'
    $code &= @LF & '        arrToReverse(intLower) = arrToReverse(intUpper)'
    $code &= @LF & '        arrToReverse(intUpper) = varHolder'
    $code &= @LF & '    Next'
    $code &= @LF & 'End Sub'
    Local $vbs = ObjCreate("ScriptControl")
    $vbs.language = "vbscript"
    $vbs.Timeout = -1
    $vbs.addcode ($code)
;~  FileWrite(@ScriptDir&"\subsort.vbs",$code)
    $arEither2D1D = $vbs.Run("SubSort", $arEither2D1D, $iIndex,$icase)
    $vbs = ""
EndFunc   ;==>_Array2D1DFieldSortSt
Best, Randall

[if you want it to work in win9x, you can't use this sort; but this shows how to parse it and fastest sort; change to 2D array and use autoit sort would be OK; there are some speed up algorithms for that too if its too slow...]

Wow.. thanks... I'm not able to test the code right now, but I'm fairly confident it'll work considering you've posted it... My final year started today... My miniproject lab exam's scheduled on the 6th... and my submission is ... neoSearch! Lol... Its the best program by far in my class (as per internal grading), I just hope the external examiner feels the same way...
Link to comment
Share on other sites

@Koshy John

Thanks for the reply.

Nevertheless I can't agree with your statement "neoSearch is designed to be a complete replacement to the native indexing service"

First of all MS Indexing Service has some very advanced SQL features which or not available in yours, I guess.

See here for more info :

SQL Dialect 1

SQL Dialect 2

Furthermore in MS Indexing Service you can created your on SQL VIEWS and use as well the PREDEFINED VIEWS.

This is something you can only do in SQL not in a text based system. Which increases the search speed dramatically.

Regarding the overhead, this is fully configurable as well :

Performance tuning

So it is not quit an replacement of the MS indexing service, is it ?

But I agree on you second remark, you learned a lot from it, and that's what counts.

Keep up the good work.

regards

ptrex

Edited by ptrex
Link to comment
Share on other sites

@Koshy John

Thanks for the reply.

Nevertheless I can't agree with your statement "neoSearch is designed to be a complete replacement to the native indexing service"

First of all MS Indexing Service has some very advanced SQL features which or not available in yours, I guess.

See here for more info :

SQL Dialect 1

SQL Dialect 2

Furthermore in MS Indexing Service you can created your on SQL VIEWS and use as well the PREDEFINED VIEWS.

This is something you can only do in SQL not in a text based system. Which increases the search speed dramatically.

Regarding the overhead, this is fully configurable as well :

Performance tuning

So it is not quit an replacement of the MS indexing service, is it ?

But I agree on you second remark, you learned a lot from it, and that's what counts.

Keep up the good work.

regards

ptrex

Search speed might be better with the SQL backend but I don't think neoSearch is particularly lacking in that respect (but yes, custom views would be very hard to create unless it was incorporated into the indexing process in the first place). I would say that the choice between the SQL indexing engine and the one neoSearch provides would be based on the requirements and inclinations of the end user.

If I did start using the indexing service's database as my program's backend, it would be dimished to becoming a pretty face for Microsoft's technology... And like I've stated before, I'm averse to that end especially since I've invested a lot of time and effort in preparing my own original indexing algorithms...

I'm impressed by the code you've released though... Maybe you should work on nice front end rather than waiting for someone to pick up from the point where you've left your code... Considering you were knowledgable enough to write that code, I'm sure you'll be able to eclipse neoSearch's interface...

Link to comment
Share on other sites

Hi~ Koshy John,

It's a really good and usefull software~~ one of the most impressive software here.

I just have some wishes about your program.

1. is it possible to make neosearch portable? ( no install, no trace on host PC ) For my personal reason, I always have to carry USB hard disk with me. If I can use neosearch in my usb hard disk, it would be very nice. This is what I really want ~ I am sure there are many people who want to have a good serarching program in their portable storage.

2. is it possible to release another language version? there are not many texts but I just want to share it without language barrier.

3. A question? neosearch can find very well but it doesn't find all ( it is missing a few files ) other language filename ( korean). is it the way it should be? or bug?

Anyway, Thanks again KJ.

Kjason

Link to comment
Share on other sites

Hi~ Koshy John,

It's a really good and usefull software~~ one of the most impressive software here.

I just have some wishes about your program.

1. is it possible to make neosearch portable? ( no install, no trace on host PC ) For my personal reason, I always have to carry USB hard disk with me. If I can use neosearch in my usb hard disk, it would be very nice. This is what I really want ~ I am sure there are many people who want to have a good serarching program in their portable storage.

2. is it possible to release another language version? there are not many texts but I just want to share it without language barrier.

3. A question? neosearch can find very well but it doesn't find all ( it is missing a few files ) other language filename ( korean). is it the way it should be? or bug?

Anyway, Thanks again KJ.

Kjason

1. It is possible to make it portable so that it runs with no trace on the host PC. A question of my own: Are you intending to search the contents of the pen drive or the contents of the host PC? For privacy reasons, I don't think I'd want neoSearch to create an index of another machine so that the machine can be searched without being physically at it.

2. Another language version? I'm aware that there are a large number of users who'd want that... Now that you've mentioned it, I'll think of ways to make that possible. Like maybe read text for different languages from their respective INI files. I'd need volunteers to translate text for that...

3. Its some sort of a bug that I haven't really pinpointed the source of. It could be something related to Windows, AutoIt or my specific implemetation of indexing/querying. randallc maintains its due to the way Command prompt handles piping. I haven't actively tried working to fix this as of yet since very few people have complained about it.

Thank you for using my program and providing valuable feedback!

Link to comment
Share on other sites

1. It is possible to make it portable so that it runs with no trace on the host PC. A question of my own: Are you intending to search the contents of the pen drive or the contents of the host PC? For privacy reasons, I don't think I'd want neoSearch to create an index of another machine so that the machine can be searched without being physically at it.

2. Another language version? I'm aware that there are a large number of users who'd want that... Now that you've mentioned it, I'll think of ways to make that possible. Like maybe read text for different languages from their respective INI files. I'd need volunteers to translate text for that...

3. Its some sort of a bug that I haven't really pinpointed the source of. It could be something related to Windows, AutoIt or my specific implemetation of indexing/querying. randallc maintains its due to the way Command prompt handles piping. I haven't actively tried working to fix this as of yet since very few people have complained about it.

Thank you for using my program and providing valuable feedback!

Thanks for the reply, Koshy John

1. I would like to use neosearch on my usb hard disk but want to search both host pc and removable disk. If it is available it's perfect but if you do not want to do create index of host pc.... then...it' OK. just indexing the drive where neosearch is actually located in. I hope you can realease the portable version soon.

2. If you need my help, I will happily translate it into korean

3. I hope you can find some time on this issue~ ^^;

Link to comment
Share on other sites

Well, After installing it I can see why you would be proud of it and not want to give out the code(Althought, I really, really, really wish you would :) ) Maybe after you WOW your instructors in school with it you might change your mind but until then, it is a really great application and I commend your efforts.. God Bless! Keep up the great work.

Link to comment
Share on other sites

Thanks for the reply, Koshy John

1. I would like to use neosearch on my usb hard disk but want to search both host pc and removable disk. If it is available it's perfect but if you do not want to do create index of host pc.... then...it' OK. just indexing the drive where neosearch is actually located in. I hope you can realease the portable version soon.

2. If you need my help, I will happily translate it into korean

3. I hope you can find some time on this issue~ ^^;

1. I'll probably create a version of neoSearch called neoSearch portable which will allow you to use it on portable disks and !iPods! (like searching for songs and videos on ur iPod)...

2. Thank you! It'll take time to create this since I've a lot of code to go through, but I'll do it...

3. I have a solution in mind.. Will know if it works only when I try it out though...

Thanks for your feedback!

Link to comment
Share on other sites

Well, After installing it I can see why you would be proud of it and not want to give out the code(Althought, I really, really, really wish you would :) ) Maybe after you WOW your instructors in school with it you might change your mind but until then, it is a really great application and I commend your efforts.. God Bless! Keep up the great work.

There's a version of the code up on the second page... Though its not the latest/greatest version... I'll eventually put the source up but only after the program's reached a certain level of professionalism... Thank you for your good wishes!
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

(1.45)

- fixed: blank icons on fresh install

- number of dynamic results increased to 5

- removed file type information display

- changed hot key from: alt+space to alt+F3

- clears neoSearch log files at the start of the next session if required

- resizable detailed results window

- new detailed results design

- rotating title for detailed results

- detailed activation process with GUI

- detailed self update process

In the works:

- better updation interface

- activation by requesting for key via e-mail (for those who don't want the program to automatically set it after connecting to the net)

- portability

- multicomputer indexing/searching

Link to comment
Share on other sites

(1.47)

- By popular request: Dynamically resortable full results in a resizable window

- even faster performance

- revamped update check algorithm

- fine tuned activation system

(1.45)

- compiled in 3.2.10.0

- fixed: blank icons on fresh install

- number of dynamic results increased to 5

- removed file type information display

- changed hot key from: alt+space to alt+F3

- clears neoSearch log files at the start of the next session if required

- resizable detailed results window

- new detailed results design

- rotating title for detailed results

- detailed activation process with GUI

- detailed self update process

(1.10)

- compiled in 3.2.8.1

- removed minor bugs

(1.08)

- Even faster startup

- Updater downloads the newest version from within the interface instead of calling Internet Explorer

- Updater is now capable of replacing previous versions automatically once the user sanctions it.

(1.07)

- GUI is now DRAGABLE!

- Alternating tray icon while indexing

- Much faster startup (noticable on slow systems)

- neoSearch voice is now disabled by default.

- Performance improvements from shifting to autoit 3.2.6.0 from 3.2.4.9

- Richer bluegreen texture with no artifacts

Link to comment
Share on other sites

  • 4 weeks later...

Hello,

I am sorry to ask you, but I really need your help. Do you have a function that might be able to index everything in a folder and output a list in a text file. The list that I need should contain the exact file location of every file in a folder.

Ex,

c:\users\draygoes\desktop\blah.txt

c:\users\draygoes\blaggg.txt

c:\users\draygoes\rurururur.dat

And so on.

I really need this for an upcomeing project and I would be more than willing to give you credit for your help in the project. Thanks.

Thank you for reading,

Jerry Parnell

I just thought a lot more people would benefit this way, so I put it up at the forum rather than reply as a PM.

You don't have to give me credit (in this particular case and not as a rule for all my other code out there) - just don't claim any code authored by someone else as yours.

Anyway, here's one way to do what's been requested and I hope it meets your requirements:

Func listcontents($path,$destfile)
;author: Koshy John
;lists the contents of the given path into the specified destination file
;
;Parameters:
;  $path = a complete path without trailing backslash
;  $destfile = file to which the data is to be written
;Return Value: 0 - failure
;              1 - success
;     @error = 1 - invalid path
;              2 - unable to open destination file
    
    Local $pid
    Local $file
    Local $buffer
    If FileExists($path) = 0 Then 
        SetError(1)
        Return 0
    EndIf
    $file = FileOpen($destfile, 2)
    If $file = -1 Then
        SetError(2)
        Return 0
    EndIf
    $pid = Run(@ComSpec &' /C dir/a/b/s "'&$path&'\*"', "", @SW_HIDE, 6)
    While 1
        $buffer = StdoutRead($pid)
        If @error Then ExitLoop
        FileWrite($file, $buffer)
    Wend
    While 1
        $buffer = StderrRead($pid)
        If @error Then ExitLoop
    WEnd
    FileClose($file)
    
    Return 1
EndFunc
Edited by Koshy John
Link to comment
Share on other sites

  • 4 months later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...