photools.com Community

IMatch Bug Reports and Feature Requests => Feature Requests => Archive (Feature Requests) => Topic started by: Ferdinand on May 06, 2015, 12:52:58 PM

Title: Limit context / scope of files in a search undertaken via a script
Post by: Ferdinand on May 06, 2015, 12:52:58 PM
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
Title: Re: Limit context / scope of files in a search undertaken via a script
Post by: Mario on May 06, 2015, 04:52:35 PM
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.
Title: Re: Limit context / scope of files in a search undertaken via a script
Post by: Ferdinand on May 07, 2015, 12:03:01 AM
Sometimes Mario you astound us.   :o   Thank you!
Title: Re: Limit context / scope of files in a search undertaken via a script
Post by: Carlo Didier on May 07, 2015, 10:05:14 AM
Quote from: Ferdinand on May 07, 2015, 12:03:01 AM
Sometimes Mario you astound us.   :o   Thank you!

Sometimes?  8)
Title: Re: Limit context / scope of files in a search undertaken via a script
Post by: Ferdinand on May 07, 2015, 12:19:21 PM
Often?  Frequently?  Mostly?  I don't want to say "always" in case it goes to his head.   ::)
Title: Re: Limit context / scope of files in a search undertaken via a script
Post by: Richard on May 07, 2015, 01:58:20 PM
 
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.
Title: Re: Limit context / scope of files in a search undertaken via a script
Post by: Mario on May 07, 2015, 02:33:22 PM
Quote from: Ferdinand on May 07, 2015, 12:19:21 PM
...in case it goes to his head.   ::)
Lots of air in there, plenty of room  ;)
Title: Re: Limit context / scope of files in a search undertaken via a script
Post by: 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.
Title: Re: Limit context / scope of files in a search undertaken via a script
Post by: sinus on May 07, 2015, 05:35:50 PM
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.