I think it would be praktical to have a button near "Jetzt Suchen" which automativally creates an item in the catalog which performs the search from a script.
Maybe it can first prompt for a suitable name for this script item and an icon?
Catalog - add current search as script. How to quicksearch(?) to search in contents
Catalog - add current search as script. How to quicksearch(?) to search in contents
Last edited by Julian on 31 Dec 2022 10:38, edited 1 time in total.
Re: Catalog - add current search as script
I now fould that using the QuickSearch I can get what I need.
I.e. I create a catalog entry which runs this quick script: ?ageM:<= 30 d /flatfiles
I.e. I create a catalog entry which runs this quick script: ?ageM:<= 30 d /flatfiles
Re: Catalog - add current search as script. How to quicksearch(?) to search in contents
I tried to improve this to search for (binary) contents in the current view (and optional subfolders)
I came up with this quickscript
That does nothing visible since quicksearch is returning a set of files which I can display in in a text() box - which is not what I need.
Which scriopt command has to be used to launch a search just like the search box?
--> It would be useful if the search box could create a script - mabye even with a placeholder as input() dialog.
I came up with this quickscript
Code: Select all
::$T=input("Suche nach Text");quicksearch("contentflags=b/contents="+$T)
Which scriopt command has to be used to launch a search just like the search box?
--> It would be useful if the search box could create a script - mabye even with a placeholder as input() dialog.
Re: Catalog - add current search as script. How to quicksearch(?) to search in contents
To use the search gui?
Just getting the search results in a pane?
loadsearch()
but this would require a search template (that you're saved before or create on the fly) which you would need to do via scripting.Just getting the search results in a pane?
paperfolder()
One of my scripts helped you out? Please donate via Paypal
Re: Catalog - add current search as script. How to quicksearch(?) to search in contents
Thank You!
I tried this
This does not work, unfortunately. (it does not know paperfolder)
Of course I can press and F3 and then type in
* /contflags=b/contents=sometext
or use #266 in my script to open the quickfind.
I tried this
Code: Select all
::$T=input("Suche nach Text");$files=quicksearch("contentflags=b/contents="+$T);paperfolder("Ergebnis",$files,,n)
Of course I can press and F3 and then type in
* /contflags=b/contents=sometext
or use #266 in my script to open the quickfind.
Re: Catalog - add current search as script. How to quicksearch(?) to search in contents
What does that mean, it doesn't know paperfolder?
The only thing you're doing here, is creating one, not loading it into the pane...
The only thing you're doing here, is creating one, not loading it into the pane...
One of my scripts helped you out? Please donate via Paypal
Re: Catalog - add current search as script. How to quicksearch(?) to search in contents
The last time I got the message paperfolder() was not known as script command.
I modified my script to the one below and it works! Thanks for the hint to explore the concept paperfolder.
(I still think this is too complicated and should be created automatically.)
This script searches from current location in binary mode and opens a pane with the result (I hope)
I modified my script to the one below and it works! Thanks for the hint to explore the concept paperfolder.
(I still think this is too complicated and should be created automatically.)
This script searches from current location in binary mode and opens a pane with the result (I hope)
Code: Select all
::$T=input("Find any text");$files=quicksearch("contentflags=b/contents="+$T);paperfolder("SearchResult",$files,,n); goto(paper:SearchResult)
Re: Catalog - add current search as script. How to quicksearch(?) to search in contents
After playing with the options I decided to create a specialized program for this task. It integrates within XY - read more here: viewtopic.php?t=25645
-
- Posts: 195
- Joined: 21 Oct 2020 23:33
- Location: Through the Looking-Glass
Re: Catalog - add current search as script. How to quicksearch(?) to search in contents
I too would like to have a flag for the quicksearch() function that triggers the provided expression as if it were entered into the GUI.
The problem with passing the return of quicksearch() as an argument to paperfolder() is that inconsistencies between a GUI quick search and paper folder.
Depending on your settings, the view could be very different between a quick search and a paper folder, you have to do a hard-delete (shift+delete) to actually affect the file in a paper folder, and refreshing the tab would normally clear a quick search but it doesn't do much for a paper folder. There's also the fact that paperfolder() creates a file in the <xypaper> directory, which isn't desirable whenever one makes a search.
Only searches performed by the FindFiles tab are saveable and therefore callable by loadsearch(). If the function could accept a raw-template instead of a template name then that would be more flexible.
The problem with passing the return of quicksearch() as an argument to paperfolder() is that inconsistencies between a GUI quick search and paper folder.
Depending on your settings, the view could be very different between a quick search and a paper folder, you have to do a hard-delete (shift+delete) to actually affect the file in a paper folder, and refreshing the tab would normally clear a quick search but it doesn't do much for a paper folder. There's also the fact that paperfolder() creates a file in the <xypaper> directory, which isn't desirable whenever one makes a search.
Only searches performed by the FindFiles tab are saveable and therefore callable by loadsearch(). If the function could accept a raw-template instead of a template name then that would be more flexible.
Re: Catalog - add current search as script. How to quicksearch(?) to search in contents
When you perform a quicksearch via GUI, do you take note of the path in the address bar? you can use that with SC goto.
-
- Posts: 195
- Joined: 21 Oct 2020 23:33
- Location: Through the Looking-Glass
Re: Catalog - add current search as script. How to quicksearch(?) to search in contents
Actually no I never noticed, I've never used the address bar and so its always been removed.
That worked perfect, seems to replicate the GUI function exactly, thanks a bunch
Images not named 'cover'|goto "?>^cover\. /i /excl=Graphics\ /types={:image} //Images not named 'cover'"|<xyicons>\filetypes\image.ico
That worked perfect, seems to replicate the GUI function exactly, thanks a bunch