Minor bug in cm_SrcViewModeList

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Galizza
Member
Member
Posts: 198
Joined: 2018-09-07, 05:21 UTC

Minor bug in cm_SrcViewModeList

Post by *Galizza »

 
Hi, i've noticed a bug when using cm_SrcViewModeList command.


If i use it this way it works ok.

Code: Select all

[em_SameViewModeBothPanels]
Cmd=cm_SrcViewModeList 2,cm_FocusTrg,cm_SrcViewModeList 2

But if i use an em_command instead of cm_SrcViewModeList 2

Code: Select all

[em_SameViewModeBothPanels]
Cmd=em_ViewModeBlackBlue,cm_FocusTrg,em_ViewModeBlackBlue

[em_ViewModeBlackBlue]
Cmd=cm_SrcViewModeList 2
Then it doesn't work, thanks.


Tc 11.51 Final 32 Bits // Windows 10 22H2 32 Bits
 
 
 
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50383
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Minor bug in cm_SrcViewModeList

Post by *ghisler(Author) »

Total Commander doesn't wait for the em_command to finish. Try this instead:

Code: Select all

[em_SameViewModeBothPanels]
Cmd=em_ViewModeBlackBlue,cm_wait 100,cm_FocusTrg,em_ViewModeBlackBlue

[em_ViewModeBlackBlue]
Cmd=cm_SrcViewModeList 2
What happens is that Total Commander calls PostMessage with em_ViewModeBlackBlue, so it is only handled after em_SameViewModeBothPanels ends (or during cm_wait). So the execution order actually is
cm_FocusTrg,em_ViewModeBlackBlue,em_ViewModeBlackBlue
I will try to execute them in order by using SendMessage instead.
Author of Total Commander
https://www.ghisler.com
User avatar
Galizza
Member
Member
Posts: 198
Joined: 2018-09-07, 05:21 UTC

Re: Minor bug in cm_SrcViewModeList

Post by *Galizza »

ghisler(Author) wrote: 2025-02-23, 09:24 UTC I will try to execute them in order by using SendMessage instead.
Thanks :!:
Post Reply