Are remarks in wincmd.ini possible?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
lezerogan2
Junior Member
Junior Member
Posts: 83
Joined: 2010-04-19, 15:50 UTC

Are remarks in wincmd.ini possible?

Post by *lezerogan2 »

Hi,
A very minor question,
Is there a way I can write a remark line (like documentation)
in file wincmd.ini?
Thank you
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: remark in wincmd.ini

Post by *Horst.Epp »

No.
You can add comment lines but the sort order will not be preserved.
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
Stefan2
Power Member
Power Member
Posts: 4132
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: remark in wincmd.ini

Post by *Stefan2 »

lezerogan2 wrote: 2022-06-28, 19:34 UTC
Is there a way I can write a remark line (like documentation) in file wincmd.ini?

Yes, with an semicolon ;      (it's a unsupported features, but I use this for ten years)

May NOT work for every parameter as the programmer didn't had foreseen a user would ever use comments in the INI.

Code: Select all

[Configuration]
UseIniInProgramDir=7 ;7=nimm diese INI im TC-Programmordner
;TitleExtraText=$THIS IS MyTestTC used as %USERNAME%
;TitleExtraText=$%USERNAME% @ %ComputerName% ÄöÜß?
InplaceRenamePath=1  ;1=Pfad wechseln per Klick auf parent in der Pfadzeile
SpaceMovesDown=1     ;1=Auswahl per SPACE-Taste, dann springe eine Datei weiter nach unten
DirBrackets=0
;ExecUseContextMenu=0
ExecUseContextMenu=0
InplaceOkButton=0    ;2=Bestätigungsschaltfläche 
MinimizeOnClose=3    ;1=X-Button; 2=A-F4; 3=both; hold Shift to force close.(03.11.10 Added)
RenameUpDown=0       ;turns off jumping to previous/next file
firstmnu=2667
DrivesShowUpcase=1
[Shortcuts]
;Enable 'F2'-key to start inline-rename mode, additional to origin 'Shift+F6'
F2=cm_RenameOnly
; Load Search with saved setting
;;C+F=em_search_CurrDirOnly
;Enable 'Ctrl+F' to start find-files, additional to origin 'Alt+F7'     
C+F=cm_SearchFor
;Use 'Ctrl+O' to launch DOS-Box in current path 
C+o=cm_ExecuteDOS
;Ctrl+0 to execute user defined command to launch PoSh in current path 
C+0=em_LaunchPowerShell 



 
lezerogan2
Junior Member
Junior Member
Posts: 83
Joined: 2010-04-19, 15:50 UTC

Re: Are remarks in wincmd.ini possible?

Post by *lezerogan2 »

Thank you
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Re: Are remarks in wincmd.ini possible?

Post by *tuska »

I am sure I have had problem with the settings in wincmd.ini before,
when I used the ";" semicolon somewhere in the middle of the line as specified above:

Code: Select all

InplaceOkButton=0    ;2=Bestätigungsschaltfläche
Since then I always use a separate line for comments and the ';' semicolon at the very beginning.
Example:

Code: Select all

[Configuration]
MaxItemsInComboBox=40
;MaxItemsInComboBox=40	https://ghisler.ch/board/viewtopic.php?p=330105#p330105
User avatar
Stefan2
Power Member
Power Member
Posts: 4132
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Are remarks in wincmd.ini possible?

Post by *Stefan2 »

tuska wrote: 2022-06-29, 07:33 UTC I am sure I have had problem with the settings in wincmd.ini before,
when I used the ";" semicolon somewhere in the middle of the line as specified above:

Code: Select all

InplaceOkButton=0    ;2=Bestätigungsschaltfläche
That could be.
Depends how the programmer split the string "InplaceOkButton=0 ;2=Bestätigungsschaltfläche" into command and argument.
If he just split at '=' and take the second part in whole (not envisaging user could have add an comment), he will get "0 ;2=Bestätigungsschaltfläche"
Only if he split at the '=' and next take the part only till the first white space, he gets "0 "
If he can't be sure that there could be only one number but more to catch, then the shown inline comment may disturb the code executing.

That's why I said that commenting in wincmd.ini is unsupported and so have to be used on own risk.



 
User avatar
white
Power Member
Power Member
Posts: 4593
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Are remarks in wincmd.ini possible?

Post by *white »

And when a new value for a setting is written to the ini file, the comment is lost.
And not all settings support comments. This is an example of a setting where an inline comment doesn't work:

Code: Select all

CompareResyncSeparators=., ;:_+-*/\?!()[]{}"'@
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Re: Are remarks in wincmd.ini possible?

Post by *tuska »

2Stefan2
Perhaps just for clarification:
It was not the quoted line that caused a problem for me - this was only meant to serve as an example.
User avatar
Stefan2
Power Member
Power Member
Posts: 4132
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Are remarks in wincmd.ini possible?

Post by *Stefan2 »

tuska wrote: 2022-06-29, 08:23 UTC 2Stefan2
Perhaps just for clarification:
It was not the quoted line that caused a problem for me - this was only meant to serve as an example.

I know :)
I used it as an example only too :wink:




Problematic entries would be smtg like that:

Viewer=TOOLs\Viewer123\Viewer.exe
Viewer=TOOLs\Viewer201\Viewer.exe ; use this as new viewer.exe

as you can't say programmatically for sure, w/o further checks, where the value ends and the comment begins.
 



 
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Re: Are remarks in wincmd.ini possible?

Post by *tuska »

Stefan2 wrote: 2022-06-29, 08:41 UTC Problematic entries would be smtg like that:
...
Viewer=TOOLs\Viewer201\Viewer.exe ; use this as new viewer.exe
...
Yes, now it comes back to me:
Back then there was a problem related to a setting for a plugin in this form.
Post Reply