TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

User avatar
Mjolnir
Member
Member
Posts: 131
Joined: 2005-10-08, 21:03 UTC

TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Mjolnir »

TC_PatternColor addon

I've developped this (external) addon to automate a one-click assigning color to selected File(s)/Folder(s) (~ "Define colors by file type"), by updating the [Colors] & [searches] TC .ini sections on the fly: Panels with colored file/folder
This is my first user contribution to "addon to TC", hope this helps... all remarks are welcome!
Note: there is only one point as, for each color applied action, TC .ini file is updated, thus, TC must be (force) restarted to take into account changes (*) (see my suggestion post: viewtopic.php?t=77800 )


Version 2023.1.13.2 32/64
URL: TC_PatternColor (use the upper right download arrow/button) // md5: 043fe51ac3fe0329afc0f3d3778c6440 *TC_PatternColor.exe


Note:
+ Backup of .ini files has been disabled by default, to reactivate it: set TCIniFileBkpBeforeModif=1 and TCIniFileBkpBeforeModifWarnOnBkpError=1
+ To prevent from TC restart: Set TCExitAndRestart=0 (& possibly TCExitBeforeModif=0 & TCExitAlsoAnyOtherRunningTC=0 & TCRestartAfterModif=0)
+ To avoid ESC message popup: Set TCColorGUI_MsgOnESC=0

Optional: here my ".ico" folder icon pack (if needed...)

Features
+ Add a "/R %S" parameter option to raise the "Color picker" popup & directly ask user for color to apply to selected file/folder (ie: no more need to specify any "Color name" on command line :wink: ) => execute one time the "TC_PatternColor.exe" file to get a button example (in your clipboard) to paste in your TC bar
+ Improve "/L" and add "/C" parameters => execute one time the "TC_PatternColor.exe" file to get help
+ When select file(s)/folder(s) in a TC Panel, on button click, a color is applied (& TC .ini updated), then, TC is restared to take into account changes (*)
+ If double-click on the exe, a button example is copied in your clipboard => to paste into your TC bar
+ List actual matching Color <-> file/Folder patterns (can be full name, or extension only)
+ If it's an unknown color, a popup is raised to user on button click, to create it
+ Debug dump improved (if set DEBUG=1)
+ Modified 1 parameter:
-- TCIniFileBkpBeforeModif=0 => Backup of .ini files set to *NO* by default (can change it to =1 to perform backup again, of *ALL* possible .ini files (like "redirection" ones too))
+ Added 2 new parameters in .ini :
-- TCIniFileBkpBeforeModifWarnOnBkpError=0 => (only active if TCIniFileBkpBeforeModif=1): if set to 1 and an error occurs during copy => warn user
-- TCKeyAddSearchInAndText=0 => to NOT add extra keys "PatternColorXxx_SearchIn=" & "PatternColorXxx_SearchText="
+ Do NOT handle duplicate values (ex: Selected Dummy.xyz and FileName.xyz => got same <ext> => if 1st already processed, do not process the next same ones)
+ Huge improvement regarding "Redirections" ([Colors] & [searches] sections)
++ Handle Redirection .ini file check, in this order: search & check 1st localy (~script folder), then in "given" TC .ini path, then in TC .exe path (COMMANDER_PATH)
+ Handle the "*." problems, linked to a "PatternColor<Xyz>_SearchFor=" field that may remains empty
++ Added also TCKeyValueEmptyAddPrefix="<" & TCKeyValueEmptyAddSuffix=">" as parameters to add in the "last" pattern (whenever having remove "all ones" => as "<" and ">" are not allowed chars. for names/folders, this type of search will never be reached & prevents to have a "PatternColor<Xyz>_SearchFor=" empty)


Screenshots:
- View TC file/folder colored panels on my side : Panels with colored file/folder (filter applied to File/Folder extension or name)
- On the opposite, here a default view TC Panels NOT colored (switched with command: "cm_SwitchColorsByFileType")
- Popups Help dialog box (if double-click on script) & List Color & actual defined Patterns
- TC Button example & Color picker (there, for the unknown "PatternColorBlue" color)


-------
Installation (one time):
- Download last version for TC_PatternColor.exe & .ini files, then uncompress it locally in a folder
- Inside TC, run (execute) "TC_PatternColor.exe" at least one time => to get in your clipboard an example of a TC button (& an additional help popup)
- Then, on your TC button bar -empty zone-, you can right-click & paste the new button !

Usage:
1. Select one or more file(s)/folder(s) in a TC panel (usually, via the right mouse button)
2. Then, click on the button in your TC bar
=> the app will set/unset (or request) color to the selected File/Folder extention or name (depending on configuration: /E or /N) & restart TC (*)

How to create new "color" buttons:
- You can simply duplicate a button & (only) change the "PatternColorXxx" name in field "Parameters" (keep unchanged the "/E" (or "/N") and "%S" parameters)
=> to create new button Pattern colors (as explained, the color will be asked to user on first usage)

Actions performed by the app, on a button click:
- Current TC Position/Configuration/History is saved (see "TCForceSaveConf=1" in config .ini file)
- Current TC .ini file is backuped (see "TCIniFileBkpBeforeModif=1" in config .ini file)
- If the "Color" is unknown (first usage), a user request/color picket to choose popup is performed
- For selected File/Folder extension, the color is assigned (added/matching keys from [Colors] & [searches] sections from your TC .ini file)
- TC is restarted (*), to take into account color/pattern changes (see "TCExitAndRestart=1" in config .ini file)

Note:
- You can configure this tool by editing its "TC_PatternColor.ini" file. Main parameters are:
-- TCForceSaveConf=1
-- TCIniFileBkpBeforeModif=1
-- TCExitAndRestart=1
-- TCColorFilterPrefix=PatternColor
- Whenever get any problem with your TC .ini file, you can rollback/restore it from ".ini.bkp/" folder (take the last dated one, an rename/copy it back in place, usually into: %USERPROFILE%\AppData\Roaming\GHISLER\)


-------
(*) TC is a mandatory restarted, as there is no internal command to re-read [Colors] & [searches] sections form TC .ini file (can avoid with "TCExitAndRestart=0")... see my suggestion post: viewtopic.php?t=77800 :wink:
Last edited by Mjolnir on 2023-01-13, 18:02 UTC, edited 19 times in total.
Longue vie a TC... déjà + de 20 ans de bons et loyaux services chez moi !
User avatar
Mjolnir
Member
Member
Posts: 131
Joined: 2005-10-08, 21:03 UTC

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Mjolnir »

*** reserved ***
Longue vie a TC... déjà + de 20 ans de bons et loyaux services chez moi !
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Horst.Epp »

Before I start to test it a question,
does your add-on wok with redirected sections ?
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Mjolnir
Member
Member
Posts: 131
Joined: 2005-10-08, 21:03 UTC

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Mjolnir »

Horst.Epp wrote: 2023-01-05, 11:55 UTC Before I start to test it a question,
does your add-on wok with redirected sections ?
Ahhh, no... didn't think about this, I use my TC .ini file as it is, without any "redirection" within any sections.

-------

Update:
Here you are ! Quickly done.
Can you test this build... I've tried to handled (so far) "redirection" point.

Version 2023.1.5.2 32/64
URL: TC_PatternColor_2023.1.5.2 (note: no changes in initial script .ini) // md5: 44bc433ae20118acb97cd9c83d337606 *TC_PatternColor.exe

Features
+ Handle "redirections" from sections (+ backup of both .ini files)
Longue vie a TC... déjà + de 20 ans de bons et loyaux services chez moi !
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Horst.Epp »

I get the following error after pressing the Ok button in the first run of TC_PatternColor.exe
---------------------------
AutoIt Error
---------------------------
Line 19075 (File "C:\Tools\Wincmd\PLUGINS\TC_PatternColor\TC_PatternColor.exe"):
Error: Subscript used on non-accessible variable.
---------------------------
OK
---------------------------

The button from the clipboard is ok, but there is no change of colors of the selected files
after selecting a few files, pressing the button, selecting a color and TC is restarted.

The Colors section in wincmd.ini gets some lines added:
ColorFilter9=>PatternColorDummy
ColorFilter9Color=32768

The Searches section in wincmd.ini gets the following lines added:
PatternColorDummy_SearchFor=*.PatternColorDummy;*.ahk;*.ini;*.txt
PatternColorDummy_SearchIn=
PatternColorDummy_SearchText=
PatternColorDummy_SearchFlags=0|002002000020|||||||||0000|||

but this is useless as Searches is redirected.

The backup file is stored in a absolute useless path:
C:\Temp\Test\.ini.bkp\wincmd.ini_20230105_142305.bkp

Note that this is a portable TC installation !
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Mjolnir
Member
Member
Posts: 131
Joined: 2005-10-08, 21:03 UTC

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Mjolnir »

2 points:
1. I've delivered another version :

Version 2023.1.5.3 32/64
URL: TC_PatternColor_2023.1.5.3 (note: no changes in initial script .ini) // md5: 727d9ae13867861843c52425e28e9930 *TC_PatternColor.exe

Features
+ Handle "redirection" file not existing

2. For the "The backup file", you can, in TC_PatternColor.ini file:
- change the variable "TCIniFileBkpFolder" to point, for example, to "TCIniFileBkpFolder=c:\Temp\my TC ini Backup will be There\" (or any other path)
- or even, not perform any backup, by setting: "TCIniFileBkpBeforeModif=0"
Longue vie a TC... déjà + de 20 ans de bons et loyaux services chez moi !
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Horst.Epp »

This version gives the errror:
---------------------------
Information (2023.1.5.3)
---------------------------
WARNING:
The [Configuration] / AlternateUserIni=<>: pointed file does not exists, please check...

This is possibly blocking, as some errors may occurs later in script processing...

Continue ?
---------------------------
Yes No
---------------------------

Sorry, but in this state its to early to test
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Mjolnir
Member
Member
Posts: 131
Joined: 2005-10-08, 21:03 UTC

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Mjolnir »

I understand, thx for your help/tests.

=> I've improved the "redirection" point again & check of possible missing .ini files whether one section [colors] & [searches] contains or not RedirectSection=1.

Version 2023.1.5.4 32/64
URL: TC_PatternColor_2023.1.5.4 (use the upper right download arrow/button) // md5: 2ef6adc07528dfc124161f6e69162ba0 *TC_PatternColor.exe
Longue vie a TC... déjà + de 20 ans de bons et loyaux services chez moi !
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Horst.Epp »

Ok, did a last test
The first run gives a script error.
Button can be created.
Color assignments didn't change after the TC restart.
Still there are lines added into the Searches section and not into the redirected file.

I give up
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Mjolnir
Member
Member
Posts: 131
Joined: 2005-10-08, 21:03 UTC

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Mjolnir »

Sorry, the "redirection" point is quite "new" for me as I dont use it, tried to handle it, maybe too fast :(
Thx for your help so far...
Longue vie a TC... déjà + de 20 ans de bons et loyaux services chez moi !
User avatar
Mjolnir
Member
Member
Posts: 131
Joined: 2005-10-08, 21:03 UTC

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Mjolnir »

Last but (maybe) not the least...

=> Having completely reworked the "redirection" part in my tool... hope this work...

Version 2023.1.5.5 32/64
URL: TC_PatternColor_2023.1.5.5 (use the upper right download arrow/button) // md5: 7276a9c4c3305ed897e838e371e463f6 *TC_PatternColor.exe
Longue vie a TC... déjà + de 20 ans de bons et loyaux services chez moi !
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Horst.Epp »

No, there are still lines added into the Searches section of Wincmd.ini
and not into the Redirected ini file associations-searches.ini
After the TC restart no coloring of the selected files are made.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Mjolnir
Member
Member
Posts: 131
Joined: 2005-10-08, 21:03 UTC

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Mjolnir »

Argh... :cry:
Let's try analyse this deeper from your side:
- can you set "DEBUG=1" in the TC_PatternColor.ini file (line ~140)
- then execute the app, and, on last popup on TC restart, press the "Exit" button => a full debug dump shoud be copied in your clipboard
=> please past the clipboard content there or MP
Longue vie a TC... déjà + de 20 ans de bons et loyaux services chez moi !
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Horst.Epp »

As requested

Code: Select all

-------(1/431/1.02ms)-------
Note (No AltIni):
- File [C:\Tools\Wincmd\wincmd.ini]
  + AlternateUserIni = []
  + Section = [Colors]
  ++ RedirectSection value = [3] (if 3 => does not exists)

=> Process with: [C:\Tools\Wincmd\wincmd.ini]

-------(1/431/1.47ms)-------
Note (No AltIni):
- File [C:\Tools\Wincmd\wincmd.ini]
  + AlternateUserIni = []
  + Section = [searches]
  ++ RedirectSection value = [0] (if 3 => does not exists)

=> Process with: [C:\Tools\Wincmd\wincmd.ini]

-------(1/0/2.67ms)-------
_SC_GetIniConf()
- $CfgIniFile = C:\Tools\Wincmd\PLUGINS\TC_PatternColor\TC_PatternColor.ini
-------
- $TCExe		[C:\Tools\Wincmd\totalcmd64.exe]
- $TCParams	[/N /I=]
- $TCIniFile	[C:\Tools\Wincmd\wincmd.ini]
-------
= _GetPath($TCExe)	[C:\Tools\Wincmd\]

-------(1/50/6.08ms)-------
/EN 3 = [TC_PatternColor.exe] // Cumulated = [TC_PatternColor.exe|]

-------(1/51/6.17ms)-------
3 - Param #1 = /E
- TCKeyValueHandleAsExt = [1]
- TCColorKey = [PatternColorDummy]
- TCColorKeyListValuesToAdd = [TC_PatternColor.exe|]

-------(1/53/6.56ms)-------
_SC_GetCommandLineParameters()
- Color = [PatternColorDummy]
- TCColorKeyListValuesToAdd [TC_PatternColor.exe]

-------(1/15/7.53ms)-------
_TC_GethWnd()
- Get TC [[CLASS:TTOTAL_CMD]]
- hWnd:0x003E127C (@error = 0)

-------(1/17/7.62ms)-------
_TC_SaveConf()
- Save conf TC: _WinAPI_PostMessage(0x003E127C, 1075, 580, 0

-------(1/181/146.54ms)-------
_TC_BackupIni()
- From: C:\Tools\Wincmd\wincmd.ini
- To: c:\Temp\TC Backup There\wincmd.ini_20230105_174940.bkp

-------(1/6/149.52ms)-------
_TC_CheckCo$TCColorKeyListValuesToAddlorsFromIni()

-------(1/431/149.92ms)-------
Note (No AltIni):
- File [C:\Tools\Wincmd\wincmd.ini]
  + AlternateUserIni = []
  + Section = [Colors]
  ++ RedirectSection value = [3] (if 3 => does not exists)

=> Process with: [C:\Tools\Wincmd\wincmd.ini]

-------(1/66/4551.04ms)-------
To Add in [Colors] section
- >PatternColorDummy
- ClrMaxId = 8
- Add: ColorFilter9=>PatternColorDummy
- Add: ColorFilter9Color=16776960

Action:
- Create: [PatternColorDummy] (TCColorKey)

-------(1/1/4551.29ms)-------
_IniWrite(): 
- IniFile	C:\Tools\Wincmd\wincmd.ini
- IniSection	[Colors]
- IniKey	ColorFilter9
- IniKeyValue	=>PatternColorDummy

-------(1/1/4552.09ms)-------
_IniWrite(): 
- IniFile	C:\Tools\Wincmd\wincmd.ini
- IniSection	[Colors]
- IniKey	ColorFilter9Color
- IniKeyValue	=16776960

-------(1/431/4553.06ms)-------
Note (No AltIni):
- File [C:\Tools\Wincmd\wincmd.ini]
  + AlternateUserIni = []
  + Section = [searches]
  ++ RedirectSection value = [0] (if 3 => does not exists)

=> Process with: [C:\Tools\Wincmd\wincmd.ini]

-------(1/67/4553.43ms)-------
To Add in [searches] section
- Add: PatternColorDummy_SearchFor=*.PatternColorDummy
- Add: PatternColorDummy_SearchIn=
- Add: PatternColorDummy_SearchText=
- Add: PatternColorDummy_SearchFlags=0|002002000020|||||||||0000|||

-------(1/1/4553.66ms)-------
_IniWrite(): 
- IniFile	C:\Tools\Wincmd\wincmd.ini
- IniSection	[searches]
- IniKey	PatternColorDummy_SearchFor
- IniKeyValue	=*.PatternColorDummy

-------(1/1/4554.28ms)-------
_IniWrite(): 
- IniFile	C:\Tools\Wincmd\wincmd.ini
- IniSection	[searches]
- IniKey	PatternColorDummy_SearchIn
- IniKeyValue	=

-------(1/1/4554.75ms)-------
_IniWrite(): 
- IniFile	C:\Tools\Wincmd\wincmd.ini
- IniSection	[searches]
- IniKey	PatternColorDummy_SearchText
- IniKeyValue	=

-------(1/1/4555.23ms)-------
_IniWrite(): 
- IniFile	C:\Tools\Wincmd\wincmd.ini
- IniSection	[searches]
- IniKey	PatternColorDummy_SearchFlags
- IniKeyValue	=0|002002000020|||||||||0000|||

-------(1/191/4555.7ms)-------
_TC_Exit()
- Exit TC: [C:\Tools\Wincmd\totalcmd64.exe, hWnd=0x003E127C]

-------(1/192/4560.36ms)-------
Msg2TC:
- _WinAPI_PostMessage(0x003E127C, 1075, 24340, 0)

-------(1/193/5082.91ms)-------
ProcessClose():
- Close TC: [PID=15868]


-------(1/4/5083.05ms)-------
_TC_CheckPatterns_AddUpdateRemove()

-------(1/431/5084.5ms)-------
Note (No AltIni):
- File [C:\Tools\Wincmd\wincmd.ini]
  + AlternateUserIni = []
  + Section = [searches]
  ++ RedirectSection value = [0] (if 3 => does not exists)

=> Process with: [C:\Tools\Wincmd\wincmd.ini]

-------(1/4/5084.87ms)-------
(#0) Process BEGIN: for[1,1] = [TC_PatternColor.exe] => in TCColorKey = [PatternColorDummy]

-------(1/4/5085.38ms)-------
(#1) File/Folder ext (Attrib=A) : 
- TCColorKey=PatternColorDummy
- TCColorKeyValueToAdd=TC_PatternColor.exe
- Ext=*.exe

-------(1/4/5085.57ms)-------
(#2) Ext found:
- TCColorKey=PatternColorDummy
- TCColorKeyValueToAdd=,*.exe

-------(1/20/5085.77ms)-------
_TC_SetPatterns_AddOrRemove(PatternColorDummy,*.exe)

-------(1/21/5086.26ms)-------
_TC_SetPatterns_Add(PatternColorDummy,*.exe)

-------(1/33/5086.49ms)-------
To Add (to):
- Ini    	C:\Tools\Wincmd\wincmd.ini
- Section	searches
- Key    	PatternColorDummy_SearchFor
- Current	*.PatternColorDummy
- Add    	*.PatternColorDummy;*.exe

Action:
- Add: [*.exe] (TCColorKeyValueToAdd) => [PatternColorDummy] (TCColorKey)

-------(1/1/5086.58ms)-------
_IniWrite(): 
- IniFile	C:\Tools\Wincmd\wincmd.ini
- IniSection	[searches]
- IniKey	PatternColorDummy_SearchFor
- IniKeyValue	=*.PatternColorDummy;*.exe

-------(1/4/5087.38ms)-------
(#0) Process END  : for[1,1] = [TC_PatternColor.exe] => in TCColorKey = [PatternColorDummy]

-------(1/20/5087.52ms)-------
_TC_Restart()
- $TCExe		[C:\Tools\Wincmd\totalcmd64.exe]
- $TCParams	[/N /I=]
- $TCIniFile	[C:\Tools\Wincmd\wincmd.ini]
-------
= $TknExe		[C:\Tools\Wincmd\totalcmd64.exe /N /I=C:\Tools\Wincmd\wincmd.ini]
= _GetPath($TCExe)	[C:\Tools\Wincmd\]
Thats how the [Searches] section lookes after
[searches]
RedirectSection=associations-searches.ini
PatternColorDummy_SearchFor=*.PatternColorDummy;*.exe
PatternColorDummy_SearchIn=
PatternColorDummy_SearchText=
PatternColorDummy_SearchFlags=0|002002000020|||||||||0000|||

You can see that you insert useless lines.
No lines are added into the file associations-searches.ini
even your debug log shows that its redirected.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Mjolnir
Member
Member
Posts: 131
Joined: 2005-10-08, 21:03 UTC

Re: TC_PatternColor: addon to apply color to File/Folder extension or name inside TC, on the fly

Post by *Mjolnir »

Yes, thx you !

Haaaaa, found some points:
1. You may have too many declared lines with possibly same "=>PatternColorDummy" value in [Colors] section (but this not the main point (even if there may be a pb regarding "which declared color is taken first on duplicated values"; I need to check this on my side))

2. There is no "AlternateUserIni=" filled variable, (only ?) expected it in the main [Configuration] section, for .ini redirection => see help extract below

3. You use in the "[searches]" section, a "RedirectSection=associations-searches.ini", filled there with a file name => but I handle it (on my app side) like it should only contains 0 or 1 => see help extract below

I've based my app on this way: here extract from my [F1] TC hml file :
1. Global option in section [Configuration]:
AlternateUserIni=<somename.ini>
If present in section [Configuration], it will redirect storing of all user-changeable sections to an alternate ini file (in this example, somename.ini), except for the following sections: [Configuration], [Layout], [Packer], [Confirmation], [Extensions], [Associations], [Shortcuts], [ShortcutsWin], [PackerPlugins], [FileSystemPlugins], [ListerPlugins], [ContentPlugins].

2. All sections can be redirected individually:
In each section, an entry
RedirectSection=
can be added to change the default behaviour. It will allow to redirect (or not) this section to another ini file:
Possible values:
0: no redirect even if the section would be redirected by AlternateUserIni
1: redirect to ini file defined via AlternateUserIni=<alternate ini file.ini>
<ininame.ini>: redirect to that specific ini
... which tells me you may be wrong (?) using :
- the "RedirectSection" parameter format (should be only 1 or 0 ?)
- & missing the "AlternateUserIni" (should be in [Configuration] section ?)
Last edited by Mjolnir on 2023-01-05, 17:28 UTC, edited 1 time in total.
Longue vie a TC... déjà + de 20 ans de bons et loyaux services chez moi !
Post Reply