Page 1 of 1
Minor bug in cm_SrcViewModeList
Posted: 2025-02-22, 13:58 UTC
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
Re: Minor bug in cm_SrcViewModeList
Posted: 2025-02-23, 09:24 UTC
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.
Re: Minor bug in cm_SrcViewModeList
Posted: 2025-02-23, 10:34 UTC
by Galizza
ghisler(Author) wrote: 2025-02-23, 09:24 UTC
I will try to execute them in order by using SendMessage instead.
Thanks
