Page 1 of 1

cm_ChangeKeyMainIni with apply

Posted: 2020-02-04, 20:42 UTC
by Fla$her
There are not enough switch commands of many options in the TC settings.
To avoid creating such a number of commands, it's possible make a command that will change the value of the desired key with activation.
It's also quite relevant in scripts (e.g., for color's changes, font sizes, etc.).

Code: Select all

cm_ChangeKeyMainIni <section> [<item>=<Value>]

Re: cm_ChangeKeyMainIni with apply

Posted: 2020-02-04, 21:38 UTC
by Dalai
Maybe it's possible to set a setting in wincmd.ini and then send WM_SETTINGCHANGE message to TC's window(s). Not sure whether or not TC re-reads its settings when it receives such a message.
Fla$her wrote: 2020-02-04, 20:42 UTCIt's also quite relevant in scripts (e.g., for color's changes, font sizes, etc.).
Can you give an example where it's useful (or even necessary) to change fonts or colors in TC via a script? What's the use-case?

Regards
Dalai

Re: cm_ChangeKeyMainIni with apply

Posted: 2020-02-04, 22:25 UTC
by Fla$her
Dalai wrote: 2020-02-04, 21:38 UTCNot sure whether or not TC re-reads its settings when it receives such a message.
I doubt it, too. Nowhere have met examples with regard to TC options with her.
And on WSH, for example, default can't be called API-functions.
Dalai wrote: 2020-02-04, 21:38 UTCCan you give an example where it's useful (or even necessary) to change fonts or colors in TC via a script?
Script or without — not the essence. This is a trivial necessity on a par with what is implemented in other file managers, editors and browsers. Сhanging font size by Ctrl+Scroll, for example. Or a toolbar in the form of a menu with a selection of color schemes or font settings.

Re: cm_ChangeKeyMainIni with apply

Posted: 2020-02-04, 23:52 UTC
by Dalai
Fla$her wrote: 2020-02-04, 22:25 UTCScript or without — not the essence. This is a trivial necessity [...]
Well, since it's not been asked/suggested before, it doesn't look like that...

Regards
Dalai

Re: cm_ChangeKeyMainIni with apply

Posted: 2020-02-05, 01:11 UTC
by Fla$her
2Dalai
I suppose people have learn from the experience from other programs. ;)

Re: cm_ChangeKeyMainIni with apply

Posted: 2020-02-05, 06:57 UTC
by MVV
I agree that it would be useful to be able to change an INI option and tell TC to apply changes w/o ugly hacks like scripting opening/applying dialogs. Some examples are changing color theme from a script, changing internal associations, ignore list etc.
But a command for changing single option won't help too much because e.g. changing color theme requires multiple commands and every command will cause updating TC window. So a complete rereading INI command would be better, but it is not easy to do.

Re: cm_ChangeKeyMainIni with apply

Posted: 2020-02-05, 11:33 UTC
by Fla$her
MVV wrote: 2020-02-05, 06:57 UTCignore list
With it just solvable:

Code: Select all

TCFS2.exe /ef if(tcini(Configuration,IgnoreListFileEnabled,#),tcm(2922)+tcm(2922),tcm(2922))
MVV wrote: 2020-02-05, 06:57 UTCa complete rereading INI command.
What could it look like?

Re: cm_ChangeKeyMainIni with apply

Posted: 2020-02-05, 14:51 UTC
by MVV
Well, such TC command could be named cm_UpdateSettings or cm_RereadSettings or cm_UpdateChangedSettings, it doesn't matter too much.

Re: cm_ChangeKeyMainIni with apply

Posted: 2020-02-05, 15:16 UTC
by Fla$her
It seems that a request for such a command has already been made. In this case, this is not exactly what need it, because it will negatively affect the speed.

Re: cm_ChangeKeyMainIni with apply

Posted: 2021-03-15, 17:11 UTC
by Fla$her
Bump for v.10