Can I use a command id in a script for a Visual filter ?
Can I use a command id in a script for a Visual filter ?
Hi
I would like to use the visual filter 02 in a script.
Is there a command id for each visual filter that I can use and if yes, where do I find them ?
If no, is there another way of using a Visual Filter in a Script ?
Thanks
I would like to use the visual filter 02 in a script.
Is there a command id for each visual filter that I can use and if yes, where do I find them ?
If no, is there another way of using a Visual Filter in a Script ?
Thanks
Re: Can I use a command id in a script for a Visual filter ?
you can use the command
to set/unset a visual filter.
in this specific case you could use
Code: Select all
filter [pattern]in this specific case you could use
Code: Select all
filter "02";My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...
Re: Can I use a command id in a script for a Visual filter ?
Thanks for the Filter command I didn't knew of !
But in fact, what I am looking for is to use the "Filter" command whit the same result as the visual filter NUMBER 02 (and not the text 02). Sorry for not having been more clearer.
So I would like a filter in a script that act like the visual filter number 02 which is the music filter (.mp3;.wav; etc)...
My visual filter number 03 is picture filter and so on
Thanks for your help !
But in fact, what I am looking for is to use the "Filter" command whit the same result as the visual filter NUMBER 02 (and not the text 02). Sorry for not having been more clearer.
So I would like a filter in a script that act like the visual filter number 02 which is the music filter (.mp3;.wav; etc)...
My visual filter number 03 is picture filter and so on
Thanks for your help !
Re: Can I use a command id in a script for a Visual filter ?
You mean an script command to use as filter what is on position 02 at "Tools > List Management > Visual Filters" ?Ysl wrote:to use the "Filter" command whit the same result as the visual filter NUMBER 02
This list is dynamic and will alter over time, so this is no good idea.
Anyway, you could use
getkey(key, section, [INIfile])
getkey("2", "mruVisualFilter");
Try this in address bar:
::msg getkey("2", "mruVisualFilter");
So an script would look like
$filter = getkey("2", "mruVisualFilter");
filter $filter;
But better would be to copy&paste this filter to an filter [pattern] command as Muroph has mentioned.
Because position 2 in [mruVisualFilter] could be something different tomorrow.
Re: Can I use a command id in a script for a Visual filter ?
Thanks for your answer !
I finally used "filter <|*.flac|*.wma|*.ogg|*.wav|*.m4a|*.mp3|>" which work great but I would like to ask one more thing :
How to apply this only to files ?
I have a folder "Music mp3" which appear when I apply the filter...strange because the "." in ".mp3" is not present in the folder name...
Thanks again !
I finally used "filter <|*.flac|*.wma|*.ogg|*.wav|*.m4a|*.mp3|>" which work great but I would like to ask one more thing :
How to apply this only to files ?
I have a folder "Music mp3" which appear when I apply the filter...strange because the "." in ".mp3" is not present in the folder name...
Thanks again !
Re: Can I use a command id in a script for a Visual filter ?
Is this the syntax to use?Ysl wrote:
I finally used
"filter <|*.flac|*.wma|*.ogg|*.wav|*.m4a|*.mp3|>"
which work great but I would like to ask one more thing :
How to apply this only to files ?
filter <| | |>
(i miss this syntax for more then one filter in the help)
Then try
filter <|"*.flac"|"*.wma"|"*.ogg"|"*.wav"|"*.m4a"|"*.mp3"|>
since the dot is used as an concatenation.
So "*.flac" means: "*" + "flac", in other words: "<all signs>" + "flac"
where the quoted "*.flac" means: use the dot literally as sign, in other words: "<all signs>" + "." + "flac"
-
admin
- Site Admin
- Posts: 64900
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Can I use a command id in a script for a Visual filter ?
There is no problem with the dot when it is within quotes.
To exclude folders prefix "!\|".
E.g. this shows all files starting with D or E or ending with .TXT:
To exclude folders prefix "!\|".
E.g. this shows all files starting with D or E or ending with .TXT:
Code: Select all
filter "!\|d*|e*|*.txt";FAQ | XY News RSS | XY X
Re: Can I use a command id in a script for a Visual filter ?
Thanks again !
filter <|"*.flac"|"*.wma"|"*.ogg"|"*.wav"|"*.m4a"|"*.mp3"|> works perfectly !
Ysl
filter <|"*.flac"|"*.wma"|"*.ogg"|"*.wav"|"*.m4a"|"*.mp3"|> works perfectly !
Ysl
-
admin
- Site Admin
- Posts: 64900
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Can I use a command id in a script for a Visual filter ?
Ysl wrote:Thanks again !
filter <|"*.flac"|"*.wma"|"*.ogg"|"*.wav"|"*.m4a"|"*.mp3"|> works perfectly !
Ysl
FAQ | XY News RSS | XY X
Re: Can I use a command id in a script for a Visual filter ?
This was also suspect for meadmin wrote:Ysl wrote:Thanks again !
filter <|"*.flac"|"*.wma"|"*.ogg"|"*.wav"|"*.m4a"|"*.mp3"|> works perfectly !
YslWhat are you doing wiht these < and > ? These are not part of the syntax.
And as I said: you don't have to quote each individual pattern.
And i was wrong with my thinking in my last post above regarding the quoting and the dot.
Don is right,
It should be:
filter "*.flac|*.wma|*.ogg|*.wav|*.m4a|*.mp3";
But this still shows folders like "Music.MP3" too. Of course i may say now.
So right here is:
filter "!\|*.flac|*.wma|*.ogg|*.wav|*.m4a|*.mp3";
I missed the syntax for more then one pattern in the help
but i can find them in the Ctrl+J -dialog.
But this "excluding folders"-trick is missing there too.
Re: Can I use a command id in a script for a Visual filter ?
Because i saw in the XYWiki "Filter <pattern>" and because I'm a stranger to scripting !What are you doing wiht these < and >
Anyway I now use your filter "!\|*.flac|*.wma|*.ogg|*.wav|*.m4a|*.mp3"; which is oerfect
Thanks again
-
admin
- Site Admin
- Posts: 64900
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Can I use a command id in a script for a Visual filter ?
Just added it.Stefan wrote:I missed the syntax for more then one pattern in the help
but i can find them in the Ctrl+J -dialog.
But this "excluding folders"-trick is missing there too.
FAQ | XY News RSS | XY X
-
admin
- Site Admin
- Posts: 64900
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Can I use a command id in a script for a Visual filter ?
The Help is okay:Stefan wrote:I missed the syntax for more then one pattern in the help
Set Visual Filter
Control what you see by stating simple wildcard patterns like *.txt. The Visual Filter is per-tab and, of course, saved between sessions. The current filter is displayed on the tab headers.
By factory default, Visual Filters will not persist across folders within the same tab; in other words, a Visual Filter is automatically cancelled when you change the location within the same tab. Tip: The context menu of the Visual Filter toolbar button contains a toggle Persist Visual Filters Across Folders where you can change this behavior.
You can state an unlimited number of wildcard patterns separated by ";" (logically treated as OR). Further you can use the wildcard "#" for any single digit (0-9). Visual Filter pattern matching is not case-sensitive: a=A.
Note that you can separate Visual Filters by "|" as well, not only by ";". The | has priority of over ; so using | you can filter items containing the ";" characte:
Desktop|;|, = List all items containing ";" or ","
If you state only one pattern and this pattern contains a ; then you have to add another dummy | to avoid that the ; is treated as separator:
Desktop|;| = List all items containing ";"
Desktop|;a| = List all items containing ";a"
Desktop|"*; *"| = List all items containing "; "
A leading ! (excalamation mark) will invert the filter, i.e. show only items *not* matching any of the patterns. If you want to show items starting with "!" you have to escape it with "\":
Examples:
a*;b* -> show all items starting with "a" or "b".
!a*;b* -> hide all items starting with "a" or "b".
\!a*;b* -> show all items starting with "!a" or "b".
You can define a filter to apply only to files but show all folders. Simply prefix "\|" to the pattern(s). For example:
\|*.txt -> show only *.txt files and all folders
\|!* -> show all folders and no files
To hide all folders simply prefix "!\|" to the pattern(s). For example:
!\|*.txt -> show only *.txt files and hide all folders
!\|* -> show all files and no folders
You can also define a filter to apply only to folders but show all files. Simply prefix "*|" to the pattern(s). For example:
*|a* -> show only folders beginning with "a" and all files
*|!* -> show all files and no folders
You can also define a caption for each Visual Filter. Simply prefix a quoted string followed by at least one space to the filter:
"Images" *.gif|*.png|*.jpg
"Items ending with g" >g$
The tab captions will show only the (unquoted) caption of a Visual Filter with caption.
Note that Visual Filters in combination with tabs allow you to show completely different listings ("filtered views") of the same location. You could for example have a tab "DLLs" (Visual Filter set to *.dll) and and tab "OCXs" (Visual Filter set to *.ocx) and have both pointing to Win\System32.
If a Visual Filter is on, the item count on the statusbar tells you the total number of items, and it does it in blue (or whatever you set the Marked Color to) as a further indication that a filter is active and effective.
Shortcut: Ctrl+J
FAQ | XY News RSS | XY X
Re: Can I use a command id in a script for a Visual filter ?
Oh, from where came this from?admin wrote:The Help is okay:Stefan wrote:I missed the syntax for more then one pattern in the help
Set Visual Filter
1.) we talked about SC Filter, there the info is missed. At least (as i see now) an link to Set Visual Filter
"Advanced Topics > Scripting Command Reference"
See "Set Visual Filter" for more about the syntax.filter
Define a Visual Filter or remove any existing Visual Filter.
Syntax
filter [pattern]
pattern: The Visual Filter to apply to the List. If empty or missing any existing Visual Filter is removed.
Examples
filter "*.txt"
Show only *.txt files.
filter
Show all files.
2.) This "View Menu" side (from which "Set Visual Filter" is an sub-topic) has no item in the content list on the left of the help file.
We can only find this by using "Find" or "Index" by accident. Or if someone point use to that.
I wonder now what else i have missed from the help, because usually i use the "Content" side to see what is in the help.
Do you still search an maintainer for the help file?
.
-
admin
- Site Admin
- Posts: 64900
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Can I use a command id in a script for a Visual filter ?
Please explain again.Stefan wrote:2.) This "View Menu" side (from which "Set Visual Filter" is an sub-topic) has no item in the content list on the left of the help file.
We can only find this by using "Find" or "Index" by accident. Or if someone point use to that.
I wonder now what else i have missed from the help, because usually i use the "Content" side to see what is in the help.
Do you still search an maintainer for the help file?
.
No, not anymore. I now have this great help software.
FAQ | XY News RSS | XY X
XYplorer Beta Club