Button to toggle comment in descript.ion?
Moderators: Hacker, petermad, Stefan2, white
- brontosaurusrex
- Junior Member
- Posts: 18
- Joined: 2021-01-01, 17:56 UTC
Button to toggle comment in descript.ion?
I'd like to have a button to toggle a little text like '✓' or 'done' to comment section (descript.ion), how would i go about that? p.s. I've found cm_SetAttrib and ctrl+z, but not sure how or if possible to turn one of this into simple toggle.
Re: Toggle comment?
You can make a button to set the comment to 'done' and a button to remove it by using the OpenAttributes command. Search the Help and see if you can figure it out.
Re: Toggle comment?
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
- brontosaurusrex
- Junior Member
- Posts: 18
- Joined: 2021-01-01, 17:56 UTC
Re: Button to toggle comment in descript.ion?
white, Roman, thanks. The tuska post seems to describe single-click set to some value variant, so no toggle, but I'm gonna call this good enough and file under 'solved'
.
p.s. I've actually tried to write a bash script, but non-utf/non-unix line endings and possibility of multiline comments set via TC would make that hard to write.

p.s. I've actually tried to write a bash script, but non-utf/non-unix line endings and possibility of multiline comments set via TC would make that hard to write.
Re: Button to toggle comment in descript.ion?
brontosaurusrex,
Roman
True, you'd need two buttons for that.The tuska post seems to describe single-click set to some value variant, so no toggle
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: Button to toggle comment in descript.ion?
Here is the description for a second button.
Delete TC file comments without asking(!):
Delete TC file comments without asking(!):
Code: Select all
OPENATTRIBUTES=Comment-DEL_for_Files&Folders
- "Change Attributes..." - Create template
- Position cursor on a file or folder where NO TC comment is present,
press and hold the Ctrl key and position cursor on the "Files" menu,
then release the Ctrl key. - Click on Menu "Files" > "Change Attributes..." >
Change plugin attributes:
-
Code: Select all
Plugin: Property: Value: tc comment (leave blank!)
- F2 Load/save settings > Save settings: Comment-DEL_for_Files&Folders > OK, OK
- See: wincmd.ini - section [attrplugin]
Code: Select all
Comment-DEL_for_Files&Folders=tc.comment := ""
- Position cursor on a file or folder where NO TC comment is present,
- Button (copy/paste onto your buttonbar)
Code: Select all
TOTALCMD#BAR#DATA OPENATTRIBUTES=Comment-DEL_for_Files&Folders wcmicon2.dll,40 OPENATTRIBUTES=Comment-DEL_for_Files&Folders || DELETE TC file comments WITHOUT ASKING!|https://www.ghisler.ch/board/viewtopic.php?t=80031|https://www.ghisler.ch/board/viewtopic.php?t=79725 -1
- Mark files and/or folders WITH TC-comments and click the button
- Attention: Any existing TC-comments will be deleted without asking(!).
Create a Button in the Buttonbar (copy/paste CODE)
- Click on "SELECT ALL" (to the right of CODE:), then press CTRL+C (copy to clipboard).
- Right-click on any place in the button bar, then click on "Paste".
⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺⸺ - Option1: Point to the new button (slightly longer): 'Tooltip' is shown (-> description to the button).
A maximum of 259 characters is allowed for the tooltip. | = create line break, || = create | as separator character. - Option2: Button bar - "Tooltip" field: A single space deactivates the display of the tooltip.
If the "Tooltip" field is empty, the content of the "Command" field is displayed. - Option3: See FAQs and explanation: Button-code (TOTALCMD#BAR#DATA) <-- <Ctrl+click on the link...>
- brontosaurusrex
- Junior Member
- Posts: 18
- Joined: 2021-01-01, 17:56 UTC
Re: Button to toggle comment in descript.ion?
tuska, thanks. Did some more experimenting, trying to use '✓' with your method and somehow it doesn't stick, i get '?' instead when reopening 'files/change attributes menu trying to save the preset. I did set 'configuration/options/Operation/File comments - Preferred type to Unicode UTF8', but the behavior is the same, any clues?
Re: Button to toggle comment in descript.ion?
Unfortunately, I don't know any solution at the moment.brontosaurusrex wrote: 2023-09-05, 17:52 UTC ... Did some more experimenting, trying to use '✓' with your method and somehow it doesn't stick,
i get '?' instead when reopening 'files/change attributes menu trying to save the preset.
I did set 'configuration/options/Operation/File comments - Preferred type to Unicode UTF8',
but the behavior is the same, any clues?
But I am sure that someone will get back to you on this topic.
Re: Button to toggle comment in descript.ion?
Either a bug or not supported. Note that in the Change attributes dialog, if you change plugin field tc.comment and use the >> button to enter ✓, it also places ? in the value field.brontosaurusrex wrote: 2023-09-05, 17:52 UTC Did some more experimenting, trying to use '✓' with your method and somehow it doesn't stick, i get '?' instead when reopening 'files/change attributes menu trying to save the preset.
Re: Button to toggle comment in descript.ion?
I can only agree with what was said before...
Further example:
Configuration > Operation > File comments ...
Windows 11 Pro (x64) Version 22H2 (OS build Build 22621.2215) | TC 11.01 x64/x86
Further example:
Configuration > Operation > File comments ...
- Preferred type: Unicode UTF16
wincmd.ini [Configuration] CommentPreferredFormat=1- Ctrl+Z: ✓ ... OK
Ctrl+Z displays '✓' as a TC file comment.
- OPENATTRIBUTES=Comment-OK_for_Files&Folders: ? ... Not OK?
In the menu "Files" > Change Attributes... you can display '✓' if you do NOT click on '>>', but it cannot be saved.
When trying to save '✓', only a ? is displayed although UNICODE is set.
- Ctrl+Z: ✓ ... OK
Windows 11 Pro (x64) Version 22H2 (OS build Build 22621.2215) | TC 11.01 x64/x86
Re: Button to toggle comment in descript.ion?
I would be interested in a statement on this subject, please.white wrote: 2023-09-05, 18:29 UTCEither a bug or not supported. ...brontosaurusrex wrote: 2023-09-05, 17:52 UTC Did some more experimenting, trying to use '✓' with your method and somehow it doesn't stick, i get '?'
instead when reopening 'files/change attributes menu trying to save the preset.
Re: Button to toggle comment in descript.ion?
Re: Button to toggle comment in descript.ion?
2whitetuska wrote: 2023-09-12, 09:21 UTCI would be interested in a statement on this subject, please.white wrote: 2023-09-05, 18:29 UTCEither a bug or not supported. ...brontosaurusrex wrote: 2023-09-05, 17:52 UTC Did some more experimenting, trying to use '✓' with your method and somehow it doesn't stick, i get '?'
instead when reopening 'files/change attributes menu trying to save the preset.
Thanks for the bug report!
2ghisler(Author)ghisler(Author) wrote: 2023-09-13, 09:15 UTC You are right, it doesn't currently support Unicode. Use Ctrl+Z instead. I will investigate the problem.
Thanks for investigating!
Re: Button to toggle comment in descript.ion?
2ghisler(Author)
Thanks for the bug fixes.
- Assign TC file comments "OK"
- Delete TC file comments without asking(!)
Note:
If you select several files or folders, you can assign a comment to them at the same time by pressing a button.
TC 11.02RC2 x64/x86
Thanks for the bug fixes.
HISTORY.TXT wrote:05.10.23 Release Total Commander 11.02 release candidate 1
13.09.23 Fixed: Change attributes: Field tc - comment didn't support setting Unicode comment (different codepage) (32/64)
The buttons listed here now work perfectly(!):HISTORY.TXT wrote:11.10.23 Release Total Commander 11.02 release candidate 2
06.10.23 Fixed: Change attributes: Field tc - comment didn't support setting Unicode comment via >> button (32/64)
- Assign TC file comments "OK"
- Delete TC file comments without asking(!)
Note:
If you select several files or folders, you can assign a comment to them at the same time by pressing a button.
TC 11.02RC2 x64/x86