Page 1 of 1
Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
Posted: 2022-10-18, 06:35 UTC
by Mjolnir
Hello,
Is it possible to have an internal "cm_" command that performs :
- read the [Colors] & [searches] sections
- & then, reapply the "filters" (like "cm_SwitchColorsByFileType")
I'm used to assign file extension directly within the TC .ini [searches] keys, but always needs to stop & restart TC to apply it...
Thx.
Re: Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
Posted: 2022-10-18, 10:43 UTC
by Horst.Epp
Redirect the Searches section and point it to an link.
Then you can swap the link without restarting TC.
Re: Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
Posted: 2022-10-18, 10:52 UTC
by Mjolnir

Sorry, I did not understand your reply/way to perform it...
Re: Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
Posted: 2022-10-18, 11:08 UTC
by Horst.Epp
Example:
Replace in your Wincmd.ini the [Searches} section with all its entries with
[searches]
RedirectSection=Searches.ini
Store the replaced section in a file named Searches1.ini
Make a link named Searches.ini to the file Searches1.ini
Now you can just swap the link and let in point to another file, Searches2.ini for example.
Re: Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
Posted: 2022-10-18, 13:14 UTC
by Mjolnir
Thank you, clever idea, works as you explained
... but unfortunately, not as I "guessed"
=> I used this to assign colors to patterns, shown in TC's panels...
OK on Config "searches"
1. WINCMD.INI
Code: Select all
[searches]
RedirectSection=Searches.ini
2. Create SearchesClr.ini
Code: Select all
[searches]
ColorRed_SearchFor=*-KO*;*.no;*.ko
ColorRed_SearchIn=
ColorRed_SearchText=
ColorRed_SearchFlags=0|002002000020|||||||||0000|||
ColorGreen_SearchFor=*-OK*;*.yes;*.ok
ColorGreen_SearchIn=
[etc...]
3. mklink /H Searches.ini SearchesClr.ini
=> OK, works fine... in the Alt+F7 & "Load/Search"
4. Create a new SearchesClrInverted.ini file
5. mklink /H Searches.ini SearchesClrInverted.ini
=> OK, works fine (on new patterns)... in the Alt+F7 & "Load/Search"
---
(but) KO on "assigned colors" to "search file patterns" on files/folders within TC's panels
(The joke is, "
there's always a but") => I'm used to quickly
assign color to (new)
search pattern using a script to directly write into TC .ini (*)... and unless I restart TC, colors are not re-applied within TC's panels

( Like :
https://ibb.co/BKLtwdw )
That's why I initially suggested for a specific "cm_" command to re-read both [searches]
and [Colors] sections to re-apply pattern filters/colors
in live...
---
(*) I got a quite advanced script that, for files/folders selected, update my TC .ini file with files/folders patterns and matching (or requested to user) colors (in [Colors] & [searches] sections)... and then, restart TC (<- it's
this last step that I'd like to avoid, and replace it by an internal "re-read in live" command)
Re: Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
Posted: 2022-10-18, 14:34 UTC
by petermad
2
Mjolnir
Help wrote:CM_REREADSOURCE 1: forces refresh even if nothing has changed in that directory, e.g. to re-load icons and overlays
2: re-applies automatic view mode change to current directory
3: both
Have you tried if CM_REREADSOURCE 1, 2 or 3 helps.
Otherwise try cm_Exit 5
Re: Suggestion: add a "cm_" command to (re)read & (re)apply the [Colors] & [searches] sections (without restart TC)
Posted: 2022-10-18, 15:30 UTC
by Mjolnir
Hum , unfortunately, yes, already tried command "CM_REREADSOURCE" (with none, and even with different parameters,1 or 2 or 3), but does not reread the TC .ini sections (or, at least, read it , but not apply changes in live in TC's panels

)
"cm_Exit 5" -> works, but restart TC (it's the "restart order" command I use)...