Suggestion - copy names only for selected (marked) files to clipboard.
No selection = empty clipboard (and no errors).
It can be separate commands. Or parameters like
cm_CopyNamesToClip 1
cm_CopyFullNamesToClip 1
cm_CopyNetNamesToClip 1
Three files selected - copy their names to clipboard
Image: https://i.imgur.com/hsbHhqG.png
Single file selected - copy name to clipboard
Image: https://i.imgur.com/H63qUXG.png
No selection, just cursor on the first file - copy nothing (empty clipboard)
Image: https://i.imgur.com/5pMiPzP.png
No selection, just cursor on [..] - copy nothing (empty clipboard). WITHOUT any errors
Image: https://i.imgur.com/5pMiPzP.png
Copy names ONLY FOR SELECTED files to clipboard.
Moderators: Hacker, petermad, Stefan2, white
Copy names ONLY FOR SELECTED files to clipboard.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
Re: Copy names ONLY FOR SELECTED files to clipboard.
You're confusing highlighting and selection.
I can offer such a solution with TCFS2:
Instead of 2017 for full or net names, specify 2018 or 2021, respectively.
I can offer such a solution with TCFS2:
Code: Select all
TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Addons\TCFS2\TCFS2.exe /ef if(msg(1074,msg(1074,1000)+1004),tcm(2017))
%S1:~,0%Z
wciconex.dll,202
Copy names if highlighted
Last edited by Fla$her on 2023-05-20, 07:04 UTC, edited 2 times in total.
Overquoting is evil! 👎
Re: Copy names ONLY FOR SELECTED files to clipboard.
TC documentation have only phrases like "selected file|files" or "file under cursor" (and no "highlighting" in relation to selection).
Thanks. I'll try to understand this magic with TCFS2.
Can you write this code on AutoHotkey?
But native implementation without %S parameter will be preferred.
Last edited by LonerD on 2023-05-20, 00:40 UTC, edited 1 time in total.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
Re: Copy names ONLY FOR SELECTED files to clipboard.
I understand, but highlighting is optional for selection:LonerD wrote: 2023-05-19, 23:57 UTCTC documentation have only phrases like "selected file|files" or "file under cursor" (and no "highlighting" in relation to selection).
ghisler(Author) wrote: 2013-06-17, 09:04 UTCThe file under the cursor is treated as selected when nothing else is selected.
Code: Select all
; Parameters: %S1:~,0%Z
#NoTrayIcon
#IfWinActive, ahk_class TTOTAL_CMD
SendMessage, 1074, 1000,,, A
SendMessage, 1074, ErrorLevel+1004,,, A
If ErrorLevel
PostMessage, 1075, 2017,,, A
Don't confuse %S and %S1:~,0, which is needed only for pre-deselection from [..].
In this case, this should apply to all name copy commands, including these:
cm_CopyPathOfFilesToClip
cm_CopyFileDetailsToClip
cm_CopyFpFileDetailsToClip
cm_CopyNetFileDetailsToClip
cm_CopyHdrFileDetailsToClip
cm_CopyHdrFpFileDetailsToClip
cm_CopyHdrNetFileDetailsToClip
Overquoting is evil! 👎