[Resolved] cm_Copy Parameters

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Galizza
Member
Member
Posts: 167
Joined: 2018-09-07, 05:21 UTC

[Resolved] cm_Copy Parameters

Post by *Galizza »

Hi, now that many Tc commands allow parameters i want to suggest the
possibility to use parameters with cm_Copy, this will allow user to assign
shorcuts to different copy modes.

cm_Copy 1 - Ask user
cm_Copy 2 - Overwrite all
cm_Copy 3 - Skip all
cm_Copy 4 - Overwrite all older
cm_Copy 5 - Auto-rename copied
cm_Copy 6 - Auto-rename target files
cm_Copy 7 - Copy all larger files (overwrite smaller)
cm_Copy 8 - Copy all smaller files (overwrite larger)

Btw if anyone know how to achieve this with current Tc version and
Autohotkey, please let me know, thanks :!:
Last edited by Galizza on 2023-05-25, 13:42 UTC, edited 1 time in total.
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: cm_Copy Parameters

Post by *Fla$her »

2Galizza
If the author had implemented my simple request, then I could offer an analogue with em_Copy [1-8].
But for some reason he does not understand how useful this supplement would be.

It would be solved as follows for em_Copy:
Command: %COMMANDER_PATH%\Utils\TCFS2\TCFS2.exe /ef "set_tcini(Configuration,ShowCopyOptions,1) tcm(905,1)
Parameters (x32): eval(select_wait(`%A`,findwnd(TMyComboBox,,findwnd(TMyGroupBox,,findwnd(TInpComboDlg))),1))"
Parameters (x64): eval(select_wait(`%A`,findwnd(LCLComboBox,,findwnd(Button,,findwnd(TInpComboDlg),0)),1))

Otherwise, you will have to duplicate the commands by specifying 1-8 instead of %A.

Another option would be if you create a command in TCFS2.ini in the Items section (to choose from two architectures):

Code: Select all

[Items]
; For TC x32:
tcopy=set_tcini(Configuration,ShowCopyOptions,1) tcm(905,1) eval(select_wait(`#1`,findwnd(TMyComboBox,,findwnd(TMyGroupBox,,findwnd(TInpComboDlg))),1))
; For TC x64:
tcopy=set_tcini(Configuration,ShowCopyOptions,1) tcm(905,1) eval(select_wait(`#1`,findwnd(LCLComboBox,,findwnd(Button,,findwnd(TInpComboDlg),0)),1))
And then execute from a button or a custom command:
%COMMANDER_PATH%\Utils\TCFS2\TCFS2.exe /ei tcopy([№])
%COMMANDER_PATH%\Utils\TCFS2\TCFS2.exe /ei tcopy(1)
—/—
%COMMANDER_PATH%\Utils\TCFS2\TCFS2.exe /ei tcopy(8)
Last edited by Fla$her on 2022-09-09, 17:01 UTC, edited 3 times in total.
Overquoting is evil! 👎
Galizza
Member
Member
Posts: 167
Joined: 2018-09-07, 05:21 UTC

Re: cm_Copy Parameters

Post by *Galizza »

2Fla$her
 
Thank you very much, i think that let users customize Tc using em_commands
was a great Christian' decision but obviously could be improved, unfortunately
Tc doesn't have macro support so we must use external tools.
I have never used TCFS2 and my knowledge about Autohotkey is very basic
but after some search i found a way to deal with this missing Tc feature.

Code: Select all

PostMessage 1075, 3101, , , ahk_class TTOTAL_CMD
WinWaitActive, , Overwrite
Control, Choose, 2, TMyComboBox1
Choose, 2    will activate Overwrite all, for other options use
numbers from 1 to 8

Thanks again :!: :!:
 
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: cm_Copy Parameters

Post by *Fla$her »

Galizza wrote: 2022-09-08, 19:02 UTC I have never used TCFS2
It's worth a try. Save both space and time.
I gave the decision. It remains only to repeat the described. ;)
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: cm_Copy Parameters

Post by *petermad »

Hi, now that many Tc commands allow parameters i want to suggest the
possibility to use parameters with cm_Copy, this will allow user to assign
shorcuts to different copy modes.

cm_Copy 1 - Ask user
cm_Copy 2 - Overwrite all
cm_Copy 3 - Skip all
cm_Copy 4 - Overwrite all older
cm_Copy 5 - Auto-rename copied
cm_Copy 6 - Auto-rename target files
cm_Copy 7 - Copy all larger files (overwrite smaller)
cm_Copy 8 - Copy all smaller files (overwrite larger)
Support++
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
jinsight
Senior Member
Senior Member
Posts: 299
Joined: 2003-02-25, 19:47 UTC
Location: Wooster, Ohio, USA

Re: cm_Copy Parameters

Post by *jinsight »

Support++

Parameters with cm_Copy in order to assign shortcuts to different copy modes.

cm_Copy 1 - Ask user
cm_Copy 2 - Overwrite all
cm_Copy 3 - Skip all
cm_Copy 4 - Overwrite all older
cm_Copy 5 - Auto-rename copied
cm_Copy 6 - Auto-rename target files
cm_Copy 7 - Copy all larger files (overwrite smaller)
cm_Copy 8 - Copy all smaller files (overwrite larger)

This feature should be added to the built in copy functions; a plugin is a stop gap measure, imo.
License #1945
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: cm_Copy Parameters

Post by *Fla$her »

jinsight wrote: 2022-09-10, 19:34 UTCa plugin is a stop gap measure, imo.
TCFS2 is a utility, not a plugin.
Overquoting is evil! 👎
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: cm_Copy Parameters

Post by *hi5 »

+1 would like to see this in TC 11
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)
Post Reply