How to change the cm_50Percent view to 20/80 view.
Moderators: Hacker, petermad, Stefan2, white
- Vochomurka
- Power Member
- Posts: 816
- Joined: 2005-09-14, 22:19 UTC
- Location: Russia
- Contact:
tc.dll is not required for this script, but it is required for the others. I am glad to help you. Be lucky in working with PowerPro.
Single user license #329241
PowerPro scripts for Total Commander
PowerPro scripts for Total Commander
-
- Junior Member
- Posts: 84
- Joined: 2004-03-14, 22:22 UTC
I will.Vochomurka wrote:tc.dll is not required for this script, but it is required for the others. I am glad to help you. Be lucky in working with PowerPro.

I used its pre-decessor, Stilletto, for al very long time in the öld days"; pitty it was discontiniued at the time.
Before i had to purchise a new PC, i used PowerPro; cant remember why i didnt installed it on this PC, uptill now, that is.
Can remember it took quit some searching before Powerpro was "ready for use".

Re: Who knows ?
Claude, do you suggest it is already part of the Beta Test running on 7.51 versions ?Clo wrote: • But sometimes, the dreams come true… Who knows ?
Please check mail…
2nsp
No, it is not implemented in TC 7.51beta
No, it is not implemented in TC 7.51beta
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: How to change the cm_50Percent view to 20/80 view.
Spoiler
nsp wrote: 2010-03-02, 13:13 UTC You should also declare hh as local and warn about the usage of flag n°1 used.
Code: Select all
local Where = 1 local i local Hand = win.handle("c=TTOTAL_CMD") local hh flag set 1 for(i = 1; 1; i = i + 1) hh = childwin.handle(Hand, i) if(hh != "" && win.width(hh) == 3) do flag clear 1 break endif endfor if(pproflag(1)) quit local HCenter = (win.left(hh) + win.right(hh))/2 local VCenter = (win.top(hh) + win.bottom(hh))/2 local expr = "ab " ++ HCenter ++ " " ++ VCenter win.mouse(expr) wait.for(10) mouse rightdown wait.for(10) mouse rightup for(i = 1; i <= Where; i = i + 1) *keys {down} endfor *keys {enter}
Code: Select all
local Where = 7
local i
local Hand = win.handle("c=TTOTAL_CMD")
local hh
flag set 1
for(i = 1; 1; i = i + 1)
hh = childwin.handle(Hand, i)
if(hh != "" && win.width(hh) == 3) do
flag clear 1
break
endif
endfor
if(pproflag(1))
quit
local HCenter = (win.left(hh) + win.right(hh))/2
local VCenter = (win.top(hh) + win.bottom(hh))/2
local expr = "ab " ++ HCenter ++ " " ++ VCenter
;win.mouse(expr)
win.sendmouse("ab",HCenter,VCenter)
wait.for(10)
;mouse rightdown
win.sendmouse ("ab",HCenter,VCenter,"rd")
wait.for(10)
;mouse rightup
win.sendmouse ("ab",HCenter,VCenter,"ru")
for(i = 1; i <= Where; i = i + 1)
*keys {down}
endfor
*keys {enter}
I didn't add here Windows version check to make old and new mouse methods work.
And even new method I made to work on Vista (tried only on 32-bit one), it seems, only partially (for...endfor routine after win.sendmouse, it seems, not executed), but at least script runs and allows to set panel separator relative position. So, after execution of a button which runs the script,
mouse cursor moves to a center of vertical separator,
then Total Commander's context menu appears with following items:
If to click some menu item there, panels separator moves according to declared proportion.20/80
30/70
40/60
50/50
60/40
70/30
80/20
Last edited by DrShark on 2021-09-28, 09:32 UTC, edited 4 times in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Re: How to change the cm_50Percent view to 20/80 view.
Since Total Commander 9.0 beta 16 the command cm_100Percent accepts parameters.
so using cm_100Percent -20 will set the divider to 20/80 view and cm_100Percent -80 will set 80/20 view.
so using cm_100Percent -20 will set the divider to 20/80 view and cm_100Percent -80 will set 80/20 view.
history.txt wrote:26.09.16 Added: cm_100percent now accepts a parameter: If >0, it sets the panel width (in percent) of the active panel. If <0, it sets the panel width (in percent) of the left window. Example: cm_100percent 70 (32/64)
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar