cm_ChangeKeyMainIni with apply

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Fla$her
Power Member
Power Member
Posts: 2996
Joined: 2020-01-18, 04:03 UTC

cm_ChangeKeyMainIni with apply

Post 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>]
Overquoting is evil! 👎
User avatar
Dalai
Power Member
Power Member
Posts: 9963
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: cm_ChangeKeyMainIni with apply

Post 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
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Fla$her
Power Member
Power Member
Posts: 2996
Joined: 2020-01-18, 04:03 UTC

Re: cm_ChangeKeyMainIni with apply

Post 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.
Overquoting is evil! 👎
User avatar
Dalai
Power Member
Power Member
Posts: 9963
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: cm_ChangeKeyMainIni with apply

Post 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
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Fla$her
Power Member
Power Member
Posts: 2996
Joined: 2020-01-18, 04:03 UTC

Re: cm_ChangeKeyMainIni with apply

Post by *Fla$her »

2Dalai
I suppose people have learn from the experience from other programs. ;)
Overquoting is evil! 👎
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: cm_ChangeKeyMainIni with apply

Post 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.
Fla$her
Power Member
Power Member
Posts: 2996
Joined: 2020-01-18, 04:03 UTC

Re: cm_ChangeKeyMainIni with apply

Post 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?
Overquoting is evil! 👎
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: cm_ChangeKeyMainIni with apply

Post by *MVV »

Well, such TC command could be named cm_UpdateSettings or cm_RereadSettings or cm_UpdateChangedSettings, it doesn't matter too much.
Fla$her
Power Member
Power Member
Posts: 2996
Joined: 2020-01-18, 04:03 UTC

Re: cm_ChangeKeyMainIni with apply

Post 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.
Overquoting is evil! 👎
Fla$her
Power Member
Power Member
Posts: 2996
Joined: 2020-01-18, 04:03 UTC

Re: cm_ChangeKeyMainIni with apply

Post by *Fla$her »

Bump for v.10
Overquoting is evil! 👎
Post Reply