Jump to content
Sign in to follow this  
JohnBailey

Listview Filter

Recommended Posts

Gesller,

That has happened to me many times, even though I have it immediately email me responses.

To All

Also, I'm working on updating my original post with either Alek's or Randall's Script (that will include the adv filter and the comboboxes). I haven't looked extensively at Alek's code, so let me know if there is a vote for which we should use or if we should combine them. This is seeming to be helpful to others and a great learning experience!

Thanks!


A decision is a powerful thing

Share this post


Link to post
Share on other sites

Gesller,

That has happened to me many times, even though I have it immediately email me responses.

To All

Also, I'm working on updating my original post with either Alek's or Randall's Script (that will include the adv filter and the comboboxes). I haven't looked extensively at Alek's code, so let me know if there is a vote for which we should use or if we should combine them. This is seeming to be helpful to others and a great learning experience!

Thanks!

Hi,

Sorry I missed all that discussion;

1. Just using the older forms of the LV commands as Alex has done fixes it back to Production version OK.

2. You can use something like "=Mus" to match full words. [using RegExp approach] - Start of words can be done; have to think!

3. "=Daa|van|-u" works for multiple search on same line[using RegExp approach]

4. For extensive clearly intelligible multiple searches, ultimately it might be better to go to ADOR approach on fast-generated 2D array.

5. Nevertheless, I had not seen the effort (or forgot) in john bailey's combo script on 2D arrays, and RegExp is still new to me and may be difficult to get right.

For speed, and accuracy, we maybe go back to that approach, and just get the 2D array quicker using the vbscript approach in my "Array2D.au3" from link in signature; using "_FileReadToArray" then "_Array2DCreateFromArrayst"; the speed goes back to the FileRead speed nearly, I think...

Func _LV_Create_2DArray($S_File) ;Could use number of headers here and skip the stringsplit
    Local $h_file = FileOpen($S_File, 0), $sString = StringStripCR(FileRead($h_file)), $a = FileClose($h_file)
    Local $arString = StringSplit($sString, @LF)
    $arString[0] = $arString[UBound($arString) - 1]
    _ArrayDelete($arString, UBound($arString) - 1)
    $arString2D = _Array2DCreateFromArrayst ($arString)
    Return $arString2D
EndFunc   ;==>_LV_Create_2DArray
I'll be interested to see the outcome.. I think it would be easy to change the combo box script to use this... just generates the 2D array quickly, and so use that for the LV to modify "_loadRowEntries"

Best, randall

Best, randall

Edited by randallc

Share this post


Link to post
Share on other sites

Hi,

Sorry I missed all that discussion;

1. Just using the older forms of the LV commands as Alex has done fixes it back to Production version OK.

2. You can use something like "=Mus" to match full words. [using RegExp approach] - Start of words can be done; have to think!

3. "=Daa|van|-u" works for multiple search on same line[using RegExp approach]

4. For extensive clearly intelligible multiple searches, ultimately it might be better to go to ADOR approach on fast-generated 2D array.

5. Nevertheless, I had not seen the effort (or forgot) in john bailey's combo script on 2D arrays, and RegExp is still new to me and may be difficult to get right.

For speed, and accuracy, we maybe go back to that approach, and just get the 2D array quicker using the vbscript approach in my "Array2D.au3" from link in signature; using "_FileReadToArray" then "_Array2DCreateFromArrayst"; the speed goes back to the FileRead speed nearly, I think...

I'll be interested to see the outcome.. I think it would be easy to change the combo box script to use this... just generates the 2D array quickly, and so use that for the LV to modify "_loadRowEntries"

Best, randall

Randall,

Stellar idea!! I've always liked your Array2D.au3 (I still think it should be made into a UDF ;-) Perhaps now is the time to team up and do so). The ADOR may have drawbacks in that other scripters would have to learn how to use it. I too am unfamilar with RegEx, and that was my concern with using it. haha I've been trying to figure out how to use it with the combobox and more over with the adv filter. Although, as you pointed out there may be more tools that can be implemented with the use of RegEx.

Thanks for the explanation with the 1. you made in you using the older forms. That does clear that up.

To All,

What's the vote gang?!

Should we go for Array2D.au3, ADOR, or RegEx?

I really want to update the original post with something that is much faster, even for my own uses it would be helpful!


A decision is a powerful thing

Share this post


Link to post
Share on other sites

what ever what ever is fastest and looks easyst to modify/customys

Edited by Alek

[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites

what ever what ever is fastest and looks easyst to modify

that's one vote :) Who's next? ;)

Alek,

Absolutely! That's why I want to decide on one and then update the original post/scripts with good examples and easier to use Functions. From that point, we'll see what else needs tweaking.


A decision is a powerful thing

Share this post


Link to post
Share on other sites

yes, John,

If you are happy just to extract that one func fron Array2D, and therefore use the vbscript approach for faster 2D array generation, there's probably no need to use the whole UDF..

And applying it to your extensive combo box and detailed option approach seems best to me;

[You could always hide the ADOR in the function, and make parameters AutoIt-like; but then not "easy to modify"? [not sure its that hard with SQLite; I can't remember... that might be another option

ADOR seems to be a pain for requiring any formatted (ie non-string) columns, such as numbers, to be specifically declared each time too....

In the long term , RegExp probably needs more expertise than we have, and not easy to modify either...]

randall

Share this post


Link to post
Share on other sites

yes, John,

If you are happy just to extract that one func fron Array2D, and therefore use the vbscript approach for faster 2D array generation, there's probably no need to use the whole UDF..

And applying it to your extensive combo box and detailed option approach seems best to me;

[You could always hide the ADOR in the function, and make parameters AutoIt-like; but then not "easy to modify"? [not sure its that hard with SQLite; I can't remember... that might be another option

ADOR seems to be a pain for requiring any formatted (ie non-string) columns, such as numbers, to be specifically declared each time too....

In the long term , RegExp probably needs more expertise than we have, and not easy to modify either...]

randall

Randall, thank you!! Your input has been extremely valuable! I agree that ADOR and RegExp would/could make it difficult for some scripters to manipulate. Furthermore, your knowledge of RegExp surpasses mine, so you are skilled and knowledgeable there my friend. I agree though, it seems we would need more knowledge.

I'm going for the Array2D funcs you have and I will do testing with them.

To All ,

I am learning a great deal from this and REALLY appreciating and enjoying all the input and tweaking/recreating that is taking place!!! I will get to work using Randall's Array2D Funcs that utilize VBS.

If anyone else has anymore input, PLEASE SHARE!!! :)


A decision is a powerful thing

Share this post


Link to post
Share on other sites

Hi,

Sorry I missed all that discussion;

1. Just using the older forms of the LV commands as Alex has done fixes it back to Production version OK.

2. You can use something like "=Mus" to match full words. [using RegExp approach] - Start of words can be done; have to think!

3. "=Daa|van|-u" works for multiple search on same line[using RegExp approach]

4. For extensive clearly intelligible multiple searches, ultimately it might be better to go to ADOR approach on fast-generated 2D array.

5. Nevertheless, I had not seen the effort (or forgot) in john bailey's combo script on 2D arrays, and RegExp is still new to me and may be difficult to get right.

For speed, and accuracy, we maybe go back to that approach, and just get the 2D array quicker using the vbscript approach in my "Array2D.au3" from link in signature; using "_FileReadToArray" then "_Array2DCreateFromArrayst"; the speed goes back to the FileRead speed nearly, I think...

Func _LV_Create_2DArray($S_File) ;Could use number of headers here and skip the stringsplit
    Local $h_file = FileOpen($S_File, 0), $sString = StringStripCR(FileRead($h_file)), $a = FileClose($h_file)
    Local $arString = StringSplit($sString, @LF)
    $arString[0] = $arString[UBound($arString) - 1]
    _ArrayDelete($arString, UBound($arString) - 1)
    $arString2D = _Array2DCreateFromArrayst ($arString)
    Return $arString2D
EndFunc   ;==>_LV_Create_2DArray
I'll be interested to see the outcome.. I think it would be easy to change the combo box script to use this... just generates the 2D array quickly, and so use that for the LV to modify "_loadRowEntries"

Best, randall

Best, randall

Why use _Array2DCreateFromArrayst() instead _Array2DCreateFromArray?


A decision is a powerful thing

Share this post


Link to post
Share on other sites

Why use _Array2DCreateFromArrayst() instead _Array2DCreateFromArray?

Hi,

Not sure if i understand; but

1. "Array2DCreateFromArray" uses a 1D Array of Arrays

2. "Array2DCreateFromArrayst" uses a 1D Array of Delimited strings [which is the format we already have here?]

Hope that is what you meant?

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...