Limit context / scope of files in a search undertaken via a script

Started by Ferdinand, May 06, 2015, 12:52:58 PM

Previous topic - Next topic

Ferdinand

As discussed in this thread

https://www.photools.com/community/index.php?topic=4518.0

If I undertake a search in a script using the SearchEngine Class, all files in the DB are considered as part of the search.  It would be useful if the context for the search could be constrained, as happens now when using the search bar in the file window.  It would be useful to have the option to constrain it to a folder or folders, categories, and the active selection

Mario

I was working on scripting anyway so I just added this. You now have a SetScope, GetScope and ClearScope method.

SetScope allows you to define the scope with an Files collection, so you can set the scope to files in a folder (or many), a category (or many), a collection, a time-line node, the current file window or whatever you can do to fill a Files collection.

Release 5.4.10.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Ferdinand



Ferdinand

Often?  Frequently?  Mostly?  I don't want to say "always" in case it goes to his head.   ::)

Richard

 
QuoteI don't want to say "always" in case it goes to his head.

If he did not already have that right, I would think that IMatch 5 has earned Mario the right to a big head.

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Richard

QuoteLots of air in there, plenty of room

If you are an airhead, I am the King of Norway.

sinus

Quote from: Richard on May 07, 2015, 02:47:48 PM
QuoteLots of air in there, plenty of room

If you are an airhead, I am the King of Norway.

At least, Richard, King of Norway would fit some of your family background - I think, if I remember correct.

But because I am sure, that Mario is not an airhead (lerned this word just now  ;D ), so Norway has to wait forever for a King Richard of Norway.
Best wishes from Switzerland! :-)
Markus