How to merge comments in descript.ion with text files?
Moderators: Hacker, petermad, Stefan2, white
I guess by selected files you mean selected folders? Or actually just selected files that tries to read the descript.ion and search for the comment? Please explain.
Button bar is fairly easy as you can pass on parameters to AHK script.
Button bar is fairly easy as you can pass on parameters to AHK script.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Will you select files in Branch view mode and / or Search results (after feed to listbox)? Or just selected files in the current folder?
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
You can try this, code posted as a gist just in case it needs further edits, easier to edit as posting code again and again on the forum here:
https://gist.github.com/hi5/4dbd52c304c4c24f183ff26d185df23f
TC Button bar, add a new button:
Command: pathto\MergeComments.ahk
Parameters: %L
You can put the script anywhere you like so it no longer has to be in the current or parent folder. Select one or more files either in current folder or branch view or search results and click the button.
Should work.
https://gist.github.com/hi5/4dbd52c304c4c24f183ff26d185df23f
TC Button bar, add a new button:
Command: pathto\MergeComments.ahk
Parameters: %L
You can put the script anywhere you like so it no longer has to be in the current or parent folder. Select one or more files either in current folder or branch view or search results and click the button.
Should work.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Code works!
It surely works - on all the modes. And the addition of a dialog box has really made it useful.
One issue: if placed on a directory, with or without comments, it reports "1 file(s) processed", but without really processing anything. This is not a problem for me, but a new user may find it somewhat misleading.
One issue: if placed on a directory, with or without comments, it reports "1 file(s) processed", but without really processing anything. This is not a problem for me, but a new user may find it somewhat misleading.
Added a check to skip directories if they are selected so selecting 1 folder and 2 files will now say 2 files processed, not 3.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
This is now working fine. Thanks.
The other script that you wrote (one that goes through sub-directories, after changing to Loop, Files, *, DS) also works well and is quite useful.
I ran it through 9,000+ files. But a lack of dialog box left me wondering if the script was working. I hit enter a second time, resulting in appending the comments twice (as expected).
Addition of a dialogue box -- a box that counts and shows progress, and disappear after action is complete -- will greatly improve the usability of that script.
The other script that you wrote (one that goes through sub-directories, after changing to Loop, Files, *, DS) also works well and is quite useful.
I ran it through 9,000+ files. But a lack of dialog box left me wondering if the script was working. I hit enter a second time, resulting in appending the comments twice (as expected).
Addition of a dialogue box -- a box that counts and shows progress, and disappear after action is complete -- will greatly improve the usability of that script.
Changed the script. You can now use this script to do it all.
Usage:
- Either select files (can be current folder, branch view and search results (after feed to listbox)) and press the button (as before)
- To process all files in the CURRENT and SUB folders place the cursor (highlighted file) on the [..] (parent dir) at the very top of the active panel, press the button. Confirm you want to process all files or cancel the script.
Now includes progress bar, if you only have a handful of files it will hardly be visible, if you have many, you should see it move.
Usage:
- Either select files (can be current folder, branch view and search results (after feed to listbox)) and press the button (as before)
- To process all files in the CURRENT and SUB folders place the cursor (highlighted file) on the [..] (parent dir) at the very top of the active panel, press the button. Confirm you want to process all files or cancel the script.
Now includes progress bar, if you only have a handful of files it will hardly be visible, if you have many, you should see it move.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
All functions in one ahk script
I did not think that it would be possible to combine all these functions in a single script. But you have done it very well. It now works in all modes (single file, multiple file selection, all sub-directories or on search results in a list box). Amazing!:D
You may consider posting it to http://www.ghisler.ch/wiki/index.php/AutoHotkey for others to benefit from.
Thank you very, very much.
You may consider posting it to http://www.ghisler.ch/wiki/index.php/AutoHotkey for others to benefit from.
Thank you very, very much.
Glad you find it useful.
It could still be improved, for example only allow certain extensions to be processed (text, bat, cmd etc) so you can't accidentally corrupt binary files (word, jpg etc), generating a log file, etc.
But I think this is probably a very specific wish which is suitable for you but I doubt there will be many other who need it.
Edit: added log file + extensions.
It could still be improved, for example only allow certain extensions to be processed (text, bat, cmd etc) so you can't accidentally corrupt binary files (word, jpg etc), generating a log file, etc.
But I think this is probably a very specific wish which is suitable for you but I doubt there will be many other who need it.
Edit: added log file + extensions.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
With the feature the script now has, I can use TC features, like directory flattening (Ctrl+B) and filtering (Ctrl+F12) conveniently to achieve that end. Running it recursively will be needed only in a few instances.It could still be improved, for example only allow certain extensions to be processed (text, bat, cmd etc)
I did not know that it FileAppend could corrupt not text files - I should be careful.
Sadly, not many might have found it useful. If I could only list how the descript.ion feature could be used in so many convenient ways!I doubt there will be many other who need it.
File commenting is one of the top 5 features in TC that I have been using for years now. There should be a separate forum where one can list innovative uses one finds for others to benefit from.
Last edited by sorcar on 2016-04-17, 07:36 UTC, edited 1 time in total.
I have found that changing a line of the script to:
..conveniently adds clipboard text between the text file and the comment. This is useful and elegant way, rather than editing the script every time.
Can you add a few lines to the script so that it asks if to add the content of the clipboard?
Thanks.
Code: Select all
FileAppend, `n%clipboard%%Comment%, %Folder%%FileName%
Can you add a few lines to the script so that it asks if to add the content of the clipboard?
Thanks.
Made a small Gui with checkboxes
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Completion of the script.
It is real fast. And that with a log file too.
Thank you hi5. I guess I have nothing else to ask for.
Thank you hi5. I guess I have nothing else to ask for.