Set File Comment Automate

English support forum

Moderators: Stefan2, white, sheep, Hacker

Post Reply
User avatar
KC_
Junior Member
Junior Member
Posts: 92
Joined: 2012-03-07, 01:39 UTC

Set File Comment Automate

Post by *KC_ » 2019-05-17, 15:50 UTC

Hi all,

Image: https://i.imgur.com/miZ7i3R.jpg

I always use the file attribute dialog to set a comment for a file.

1.) open set attrribute dialog
2.) click F2 to load settings
3.) choose comment and tag selected file as "Done"

and so on...

Is there any way to create a single button or user command for this? so I don't have to go thru the above.

1 button and it would set the comment for that file as "Done"
Another button to set it as "Favorites"
etc, etc.

Thanks!
# 251045
Total Commander 10.5 64bit

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

Re: Set File Comment Automate

Post by *tuska » 2019-05-17, 16:53 UTC

There was once an AHK-script from Hacker on this topic (in the German forum):
viewtopic.php?p=219057#p219057 - Attention: "TMemo1" must be replaced by "Edit1" ***).

Example:
- File comment with 3 call-sign-symbols "!!!"

IMPORTANT:
- Only 1 file/folder under cursor gets the comment (in this case: 3 call-sign-symbols --> !!!)
- CREATE [ADD]/REMOVE comment for a file/folder (1st click: CREATE/ADD comment, 2nd click: Remove comment)
- Existing comments will NOT be overwritten!

***) Updated AHK script from Hacker, e.g. filename: Bookmark_ON-OFF_three-call-sign-symbols_in_comment.ahk

Code: Select all

PostMessage, 1075, 2700, , , A 
WinWaitActive, ahk_class TCmtEditForm 
ControlGetText, Comment, Edit1 
IfNotInString, Comment, !!! 
   Comment = %Comment% !!! 
Else 
   StringReplace, Comment, Comment, !!!, , All 
ControlSetText, Edit1, %Comment% 
Send, {F2}
Example button [path and filename has to be adjusted]:

Code: Select all

TOTALCMD#BAR#DATA
"%COMMANDER_PATH%\Tools\AutoHotkey\Bookmark_ON-OFF_three-call-sign-symbols_in_comment.ahk"

wcmicons.dll,79
Descript.ion: Bookmark_ON-OFF_three-call-sign-symbols_in_comment|Only 1 file/folder under cursor gets the comment "!!!"|Existing comments will NOT be overwritten!|.AHK for 64-Bit || https://ghisler.ch/board/viewtopic.php?f=3&t=52620
%COMMANDER_PATH%\Tools\AutoHotkey\
0
-1
Regards
Karl

Windows 10 Pro (x64) Version 1809 (OS Build 17763.503)
Intel(R) Core(TM) i7-4770 CPU @ 3.4OGHz, 16 GB RAM
TC 9.22a x64/x86 | Everything - Version 1.4.1.941 (x64)

User avatar
KC_
Junior Member
Junior Member
Posts: 92
Joined: 2012-03-07, 01:39 UTC

Re: Set File Comment Automate

Post by *KC_ » 2019-05-18, 00:19 UTC

Karl, that is beautiful and awesome. I could do AHK.

Thank you very much!
# 251045
Total Commander 10.5 64bit

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

Re: Set File Comment Automate

Post by *tuska » 2019-05-18, 10:18 UTC

2KC_

You're welcome!
I then gladly pass the thanks on to Hacker. :)

Post Reply