SizeStyle

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
vicray
Junior Member
Junior Member
Posts: 14
Joined: 2003-06-22, 23:13 UTC
Location: Vic, Catalonia, Spain

SizeStyle

Post by *vicray »

The fastest way for me to change the "SizeStyle" parameter in wincmd.ini is having a shortcut for cm_ConfTabChange.
This brings up the Tabstop configuration dialog. Then I drop down the Size display menu, make my selection and OK.
When I wish to go back to my initial config, I must replay these four steps.

Question 1 : Does anybody know of a faster way to do it? By an unknown (to me) internal command accepting a parameter?

Question 2 : Would this possibility (if it IS possible!) be a useful addition in the future?

Thank you.

vicray
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Download the UTC Config editor, create a file with only the 'sizetype' key. and start it with a button. So you can open this Config editor and have immedately the key you want to change.

I think its a bit faster than with the menu.
Give it a try.


sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
vicray
Junior Member
Junior Member
Posts: 14
Joined: 2003-06-22, 23:13 UTC
Location: Vic, Catalonia, Spain

Post by *vicray »

Your suggestion seems interesting... and promising, as I imagine it can also be applied to other keys. But I'm afraid I don't know how to put into practice.

1.- I already have the UTC Config editor and I also see that it allows me to open any .ini file.
create a file with only the 'sizetype' key, and start it with a button.
2.- Should it be an .ini file? Any name would do?
So you can open this Config editor and have immedately the key you want to change.
3.- If I have already started the ini file with a button, why do I need now the Config Editor?
Even if I open the Config editor and change my key with it, how will my changes in the ini file affect TC? Doesn't it only react to changes in specifc ini files?
Are you telling me to create another wincmd.ini with just one key? And what would happen then to all my other variables?

As you can see, I'm a little lost. Would you mind going step by step? I like your idea and would really like to give it a try. Sorry for my "thickness".

Thanks a lot anyway.

vicray
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

2vicray
Would you mind going step by step? I like your idea and would really like to give it a try. Sorry for my "thickness".
Sheepdog mean by "create a file with only the 'sizetype' key" to create a Data File not wincmd.ini

the data file is a powerful feature that i found many users doesn't know how to use it

you can open notpad and paste the following code:

Code: Select all

[My Favorites]
CategoryTargetSection=Configuration
SizeFooter=1///Style of size display in the header and footer:@    0= bytes@    1= kbytes@    2= dynamic@    3= dynamic with fractional part
SizeStyle=0///Style of size display in the file list:@    0= bytes@    1= kbytes@    2= dynamic@    3= dynamic with fractional part
1- save the file with a name like "my favorite keys"
2- run UTC Config Editor
3- go to File> Open Data File... and open the above file
4- change the key value, save changes and then restart Total Commander

each time you run UTC Config Editor it will open this Data File

any way you must read the help file "Important Notes for Configuration Editor" topic to know the exact way for creating your Data File

Good luck
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Sorry that my explanation was so short.

UTC Config Editor is altering the wincmd.ini file you have specified by loading "file->Open..".
UTCCE only displays the keys they are specified in the data file you can open with "file->Open Data File..."
As default there is "tc all keys english.txt". You can adopt this file for your purposes with a text editor. Each line represents a key of wincmd.ini (if you disable wrapping). So you could use the following template:

Code: Select all

[My very special Settings]
CategoryTargetSection=Configuration
SizeFooter=1///Style of size display in the header and footer:@    0= bytes@    1= kbytes@    2= dynamic@    3= dynamic with fractional part
SizeStyle=0///Style of size display in the file list:@    0= bytes@    1= kbytes@    2= dynamic@    3= dynamic with fractional part
and save it under a name you like.

UTCCE starts always with the files you have choosen at the last running. These settings are saved in the ini file.

So If you - like me - sometimes need access to all settings of wincmd.ini you could copy the UTC-Installation to another folder. Then let your button point to the UTCCE in this folder and open the new Data file.
Now there are only displayed the keys "SizeStyle" and "SizeFooter" and you can change them easily. If you need access to the whole wincmd.ini you can run the UTCCE from the other dir. (Of course you can load the different "data-file" by hand so you wouldn't need the second UTC Folder)

When you have changed the 'SizeStyle' you need a restart of TC to let the changes take effect. That is because TC loads at start the settings from wincmd.ini into memory. And if you change them by the dialog they are changed both in memory and wincmd.ini while UTCCE only can change the wincmd.ini . So you could use an external restart tool for this, but then it will be no more faster than your solution, I fear.

So there came another solution in my mind. You may use Aezay's TCScript editor and use the following script to change to dynamic (x.x k/M/G) with one digit after the comma

Code: Select all

#define VK_TAB  9
#define VK_RETURN  13

PostCmd(cm_ConfTabChange);
SendVKey(9,1);
SendVKey(9,1);
SendVKey(9,1);
SendVKey(9,1);
SendVKey(9,1);
SendVKey(9,1);
SendVKey(9,1);
SendVKey(9,1);
SendVKey(9,1);
SendText("k");
SendText("d");
SendText("d");
#SendText("b");
SendVKey(9,1);
SendVKey(9,1);
SendVKey(9,1);
SendVKey(13,1);
The SendText("k") is always needed for a defined start. If you want the size in Kbytes you could comment the other 'SendText' lines ( insert a '#' as first char like at #SendText("b"); ). For dynamic without decimal place comment one SendText("d"), for bytes uncomment SendText("b").

Save this file as DynamicSize.tcs.

Then you have to create a button with
command: %Programpath%\TCScript.exe
parameter:/run %path%\DynamicSize.tcs


Hope You understand what I mean, otherwise just ask again please.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

2Sheepdog
your explaination is enough but here is a new tip: (not 4u coz i know u already have it!)
instead of creating new Data File for just one or two setting it is more convenient to create your [Very special Settings] category in the same Data File and Move (recommended) or Copy your special settings under it by this way you can find these settings fast with ability to access all other settings.
(no need to say you can create as categoris as you need and give each one the sutible name)
UTCCE starts always with the files you have choosen at the last running. These settings are saved in the ini file.

So If you - like me - sometimes need access to all settings of wincmd.ini you could copy the UTC-Installation to another folder. Then let your button point to the UTCCE in this folder and open the new Data file.
Next version i will change the data file extention to be "*.cedf" and assosiate with UTC Config Editor so you can easily start UTCCE by double click a data file you want start with. 8)
Post Reply