Oh, and also please note that in order to get this to work in a coherent fashion, you might need to add another flag along the lines of “eeKeepPreviousFilterLevels”, since it will otherwise be impossible for a macro to know if it should keep any pre-existing filter levels when executing its first Filter() command. Actually, it would be more logical to completely switch out the “eeFindContinue” flag for such a “eeKeepPreviousFilterLevels” flag, which would then solve this problem without having to increase the total number of flags at all.
Here follows an example to make clear what I mean. Imagine that you want to make two different macros:
1.
A macro that will add two new levels to the currently pre-existing advanced filter levels.
2.
A macro that will clear any current pre-existing advanced filter levels, and then add two new filter levels.
As far as I can see, it is impossible to make this distinction using the current flags? Both of these macros would just consist of two lines like follows:
document.Filter("FirstLevelFilterString", -1, eeFindContinue);
document.Filter("FirstLevelFilterString", -1);
And this can only result in either the previous filter levels being cleared in both cases (which is the behavior of the current EmEditor version), or the previous filter levels being preserved in both cases, right?
If you instead were to switch out the “eeFindContinue” flag for a “eeKeepPreviousFilterLevels” flag, the two macros would instead be possible to implement as follows, and both of them would work according to their individual specification as stated above:
1.
document.Filter("FirstLevelFilterString", -1, eeKeepPreviousFilterLevels);
document.Filter("FirstLevelFilterString", -1, eeKeepPreviousFilterLevels);
2.
document.Filter("FirstLevelFilterString", -1);
document.Filter("FirstLevelFilterString", -1, eeKeepPreviousFilterLevels);
As far as I can see, there also wouldn’t be any other negative consequences or losses of functionality from dropping the “eeFindContinue” flag and replacing it with the “eeKeepPreviousFilterLevels” flag. Right? Or am I somehow mistaken?