[TC 11.00rc3 and older] focus commands does not work after cm_Copy or cm_RenMov

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

[TC 11.00rc3 and older] focus commands does not work after cm_Copy or cm_RenMov

Post by *petermad »

When combining commands with cm_Copy or cm_RenMov combinations like these works fine:

Code: Select all

cm_Copy,cm_SrcByExt
cm_Copy,cm_SrcShort
cm_Copy,cm_SrcUserSpec
But if I combine with the focus commands like these, the focus commands are ignored:

Code: Select all

cm_Copy,cm_FocusTrg
cm_Copy,cm_FocusCmdLine
cm_Copy,cm_FocusMainMenu
This is not new to TC 11.00 - it also applies to at least TC 11.52

I can to a degree work around it by using:

Code: Select all

cm_Copy,cm_Wait 300,cm_FocusTrg
But it does not work, if the Overwrite dialog has been opened, and the value 300 might not work on all computers, depending on processor speed.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00rc3 and older] focus commands does not work after cm_Copy or cm_RenMov

Post by *ghisler(Author) »

Unfortunately this cannot be fixed: the cm_copy command ends when the operation is sent to a background thread - this happens as soon as you can press the "Background" button in the copy progress dialog. Some commands can be executed while a progress dialog is up, like cm_SrcByExt. Some can't like cm_FocusTrg, because the modal progress dialog prevents the focus change from happening. What you can do is start the operation directly in background via cm_copy command line parameters.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.00rc3 and older] focus commands does not work after cm_Copy or cm_RenMov

Post by *petermad »

What you can do is start the operation directly in background via cm_copy command line parameters.
I tried with:

Code: Select all

cm_Copy /G,cm_FocusTrg
But that didn't help - can you expalin further what you mean by: "via cm_copy command line parameters" ?
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00rc3 and older] focus commands does not work after cm_Copy or cm_RenMov

Post by *ghisler(Author) »

I meant something like
cm_Copy /B1,cm_wait 100,cm_FocusTrg
or
cm_Copy /B1G,cm_wait 100,cm_FocusTrg

A tiny delay is still needed to give Total Commander a chance to get the focus back, but it will always work even of the operation takes longer.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.00rc3 and older] focus commands does not work after cm_Copy or cm_RenMov

Post by *petermad »

2ghisler(Author)
OK - that works. I generally don't use the background copy though.

But - if I want to do:

Code: Select all

cm_Copy /B1,cm_Wait 100,cm_FocusTrg,cm_SelectAllBoth
It does not work, unless the files and folders I want to copy (and overwrite) are already in the target.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: [TC 11.00rc3 and older] focus commands does not work after cm_Copy or cm_RenMov

Post by *sa16 »

2petermad
It does not work
This is logical: the files have not yet been copied.
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.00rc3 and older] focus commands does not work after cm_Copy or cm_RenMov

Post by *petermad »

the files have not yet been copied.
Exactly - if I set cm_Wait to 5000, it works for copying a few files - so we are again caught by a timing problem.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00rc3 and older] focus commands does not work after cm_Copy or cm_RenMov

Post by *ghisler(Author) »

The problem is that the user can move the operation to the background, back to the foreground, pause it, start other operations while the operation is in the background, etc. etc. Therefore it's not realistically possible to wait until all operations are done.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.00rc3 and older] focus commands does not work after cm_Copy or cm_RenMov

Post by *petermad »

OK.

So for this to be realistic we would need another command or a parameter for restricting the copy process from being moved between foreground and background.

This can be moved to TC Suggestions...
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00rc3 and older] focus commands does not work after cm_Copy or cm_RenMov

Post by *ghisler(Author) »

Moderator message

Moved to suggestions
Author of Total Commander
https://www.ghisler.com
Post Reply