How does one query if there is an active search?
Have tried:
search '' ?
search ?
search 0 ?
etc..
seems not to be verb: is_search
would like logic of:
is_search ? Action if there is active search : Action if search is empty (not active)
Have tried:
search '' ?
search ?
search 0 ?
etc..
seems not to be verb: is_search
would like logic of:
is_search ? Action if there is active search : Action if search is empty (not active)
Inviato Sat 18 Mar 23 @ 2:55 am
Just search ? this : that
PS: If focus is on search box, even if the search box is empty, the query will return true.
You can use something like this clear_search & browser_window 'songs' to clear the search box and also remove focus from it.
I have the above action mapped on my ESC key.
Or you can just use browser_window 'songs' to remove focus from the search box.
You get the idea.
PS: If focus is on search box, even if the search box is empty, the query will return true.
You can use something like this clear_search & browser_window 'songs' to clear the search box and also remove focus from it.
I have the above action mapped on my ESC key.
Or you can just use browser_window 'songs' to remove focus from the search box.
You get the idea.
Inviato Sat 18 Mar 23 @ 9:53 am
Thank you Phantom,
your explanation, explains why at times it seemed to work.
And if I understand the script: search ? this : that is only querying the focus, and NOT if there is an active search, right?
I wish to query that the browser has active search results, (in search mode), and don't really care if the focus is in the search box or not.
This is not so much the concern, and focus is almost never in the search box, since the searches are scripted, and could live with the rare false TRUEs.
But, in most cases the above query is always FALSE, even when the browser is actively showing the search results.
I would like a way to getting a TRUE, when the browser is showing search results,
and FALSE, when browser is showing the songs of the virtual folder (not in search mode).
(actually don't care which is the TRUE, only that there is change, in the query)
Is there a way of querying if browser is in search mode?
(PS: a query that the search box is NOT empty would also work)
your explanation, explains why at times it seemed to work.
And if I understand the script: search ? this : that is only querying the focus, and NOT if there is an active search, right?
I wish to query that the browser has active search results, (in search mode), and don't really care if the focus is in the search box or not.
PhantomDeejay wrote :
PS: If focus is on search box, even if the search box is empty, the query will return true.
This is not so much the concern, and focus is almost never in the search box, since the searches are scripted, and could live with the rare false TRUEs.
But, in most cases the above query is always FALSE, even when the browser is actively showing the search results.
I would like a way to getting a TRUE, when the browser is showing search results,
and FALSE, when browser is showing the songs of the virtual folder (not in search mode).
(actually don't care which is the TRUE, only that there is change, in the query)
Is there a way of querying if browser is in search mode?
(PS: a query that the search box is NOT empty would also work)
Inviato Sat 18 Mar 23 @ 2:42 pm
Still wonder if there is a way to query if there is a current active search. (not to know if the focus is in/on the search box)
It seems that the software is fully aware of that a search is active, since it changes the number of columns and also, which columns are displayed.
Maybe there could be work around, (if the direct query for active search, is NOT possible) to query say, the number of columns in the browser, or the, left most (1st) column, as a way to determine if there there is an active search.
Is there possibly, a way to do the above workaround query?
It seems that the software is fully aware of that a search is active, since it changes the number of columns and also, which columns are displayed.
Maybe there could be work around, (if the direct query for active search, is NOT possible) to query say, the number of columns in the browser, or the, left most (1st) column, as a way to determine if there there is an active search.
Is there possibly, a way to do the above workaround query?
Inviato Sun 19 Mar 23 @ 8:13 am
On the quest to find a way to determine if the browser is in search mode:
querying of browser_window, does NOT work, since:
is TRUE for BOTH the normal virtual folder and for search mode.
(unlike the method designated by the option: browserColumns, which uses file=, for search and file(virt)=, for virtual folders)
Note: browser_window 'search' does not exist, I guess as it should, since this was not intention of the verb, browser_window
-----------
Is there a way to get the text (or lack of), that is currently in the search box?
does NOT work.
don't see a get_search verb, or equivalent.
Is there a way to get the text that is currently in the search box?
querying of browser_window, does NOT work, since:
browser_window 'songs' ? Action1 : Action2
is TRUE for BOTH the normal virtual folder and for search mode.
(unlike the method designated by the option: browserColumns, which uses file=, for search and file(virt)=, for virtual folders)
Note: browser_window 'search' does not exist, I guess as it should, since this was not intention of the verb, browser_window
-----------
Is there a way to get the text (or lack of), that is currently in the search box?
search & param_cast 'text' ....
does NOT work.
don't see a get_search verb, or equivalent.
Is there a way to get the text that is currently in the search box?
Inviato Mon 20 Mar 23 @ 6:17 pm
No, there is no script to get the text, and no script to check if there is text in the search box
Inviato Mon 20 Mar 23 @ 6:43 pm
@IIDEEJAYII maybe think about it the other way.
when you move folder, you lose search, you move folder [detectable], you know you're not in search, grab the file_count, if you then detect search being used keep an eye on the file_count.
is it perfect, no I just made the idea up. but it might do the job.
when you move folder, you lose search, you move folder [detectable], you know you're not in search, grab the file_count, if you then detect search being used keep an eye on the file_count.
is it perfect, no I just made the idea up. but it might do the job.
Inviato Mon 20 Mar 23 @ 7:50 pm
@Adion
Thank you for the letting me know, there is not a way to query if the browser is in "search mode".
No need to add this to a wish list as there are many more important wishes, (for example: adding script access to the "Invisible" & "Marker Only", HOTCUE attributes)
@Locodog
Thanks and like the way you think ! ... been trying to find a clever way to query something unique about the state of the browser when its in "search mode". It seems internally the browser states are known, and appears currently not accessible via VDJ script.
-----------
For the record.... I so love VDJ, as it is years ahead of every other DJ software. (almost a secret weapon of those in the know)
A quote:
"Smart people learn from everything and everyone, average people from their experiences, stupid people already have all the answers." - Socrates
Thank you for the letting me know, there is not a way to query if the browser is in "search mode".
No need to add this to a wish list as there are many more important wishes, (for example: adding script access to the "Invisible" & "Marker Only", HOTCUE attributes)
@Locodog
Thanks and like the way you think ! ... been trying to find a clever way to query something unique about the state of the browser when its in "search mode". It seems internally the browser states are known, and appears currently not accessible via VDJ script.
-----------
For the record.... I so love VDJ, as it is years ahead of every other DJ software. (almost a secret weapon of those in the know)
A quote:
"Smart people learn from everything and everyone, average people from their experiences, stupid people already have all the answers." - Socrates
Inviato Mon 20 Mar 23 @ 9:27 pm
It might help matters if you explain WHY you want to query the search, as I don't think you've said so far.
What are you trying to do? Maybe once that's clarified, some other method coulod be found.
What are you trying to do? Maybe once that's clarified, some other method coulod be found.
Inviato Tue 21 Mar 23 @ 5:46 pm
I have an existing repeat_start script that is currently activating a quick_filter..
Would like to disable that quick_filter if/when there is an active search.
Since if there is an active search, one does not get the search results one would like; getting only a subset of those tracks in the database, and NOT finding any offline results.
(quick_filters are also applied to browser when in "Search Mode", which could be useful at times, but not in most cases;
and also, NOT with this example, of the quick_filter in the running repeat_start script)
-------------
@GroovinDJ
How can I accomplish this ?
And as you say... I hope that now you understand WHY, you can now help :)
As I cannot think of way.
(as it appears there is currently NOT a way to know, (with script) if the browser is in "Search Mode")
Again,
Thanks
PS:
There are a few other cases I would find a "search mode" query useful.
Above is the case, attempting to address at the moment.
Would like to disable that quick_filter if/when there is an active search.
Since if there is an active search, one does not get the search results one would like; getting only a subset of those tracks in the database, and NOT finding any offline results.
(quick_filters are also applied to browser when in "Search Mode", which could be useful at times, but not in most cases;
and also, NOT with this example, of the quick_filter in the running repeat_start script)
-------------
@GroovinDJ
How can I accomplish this ?
And as you say... I hope that now you understand WHY, you can now help :)
As I cannot think of way.
(as it appears there is currently NOT a way to know, (with script) if the browser is in "Search Mode")
Again,
Thanks
PS:
There are a few other cases I would find a "search mode" query useful.
Above is the case, attempting to address at the moment.
Inviato Wed 22 Mar 23 @ 11:09 pm