How to change the cm_50Percent view to 20/80 view.

English support forum

Moderators: white, Hacker, petermad, Stefan2

Andre Linoge
Junior Member
Junior Member
Posts: 83
Joined: 2004-03-14, 22:22 UTC

How to change the cm_50Percent view to 20/80 view.

Post by *Andre Linoge »

Goodevening.

To my embarrasment, i just found out its possible to change the windowpanes by right-clicking on the divider. :oops:

Now i like to place an button on the bar by using the "cm_50Percent".
I need the 20/80 view, what is an exellent width for viewing mp3 info.

The question is how can i fix this view?!

TIA
Andre Linoge
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

No parameter---

Post by *Clo »

2Andre Linoge

:) Hello !

• This command can't be adjusted with some parameter, it's always back to 50%… :|

- Besides, when the divider is set to another ratio (any), and then you close TC, that ratio isn't saved.

That you wish should need a new special command like i.e. :
PANELS_RATIO <20/80>
where 20(left)/80(right) is a parameter able to accept all normal possible values for right and left…

:mrgreen: KR
Claude
Clo
Last edited by Clo on 2010-04-20, 09:35 UTC, edited 1 time in total.
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Andre Linoge
Junior Member
Junior Member
Posts: 83
Joined: 2004-03-14, 22:22 UTC

Re: No parameter---

Post by *Andre Linoge »

Clo wrote:2Andre Linoge

:) Hello !

• This command can't be adjusted with some parameter, it's always back to 50%… :|

- Besides, when the divider is set to another ratio (any), and then you close TC, that ratio isn't saved.

That you wish should need a new special command like i.e. :
PANELS_RATIO <20/80>
where 20(left)/80(right) is a parameter able to accept all normal possible values for right and left…

:mrgreen: KR
Claude
Clo
I have tryed:

Command: OPENCUSTOMVIEW
and
Parameters: PANELS_RATIO <20/80>

but had no succes.
but i keep on experimenting.

Thanks
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

PowerPro script:

Code: Select all

local Where = 1
local i
local Hand = win.handle("c=TTOTAL_CMD")

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}
For 80/20 set "local Where = 7". Good luck.

P.S. Works for horizontal (default) panels only!
Single user license #329241
PowerPro scripts for Total Commander
Andre Linoge
Junior Member
Junior Member
Posts: 83
Joined: 2004-03-14, 22:22 UTC

Post by *Andre Linoge »

Vochomurka wrote:PowerPro script:

Code: Select all

local Where = 1
local i
local Hand = win.handle("c=TTOTAL_CMD")

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}
For 80/20 set "local Where = 7". Good luck.

P.S. Works for horizontal (default) panels only!
After some fighting, i filled in the blanks with:

Command: C:\Program Files\Software\Tools\Total Commander\TOTALCMD.EXE

and

Parameters: C:\Program Files\Software\Tools\Total Commander\script\windowpane.txt("%P", "5")

I used the instructions for "how to" of the FAQ from PowerPro, but no luck.
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

Just replace

Code: Select all

C:\Program Files\Software\Tools\Total Commander\TOTALCMD.EXE
with

Code: Select all

C:\Program Files\PowerPro\PowerPro.exe
(it is the default path, check whether it is valid).

and

Code: Select all

C:\Program Files\Software\Tools\Total Commander\script\windowpane.txt("%P", "5")
with

Code: Select all

runfile.windowpane
Note that:
1. No parameter is required;
2. No file extension must be specified;
3. Plugins win.dll and childwin.dll must be in your plugins\ subfolder.

All that is said here.

Please tell me about your results.
Single user license #329241
PowerPro scripts for Total Commander
User avatar
nsp
Power Member
Power Member
Posts: 1804
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

Vochomurka wrote:PowerPro script:...
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}
[/quote]

Code: Select all

local Where = 1
local i
local Hand = win.handle("c=TTOTAL_CMD")

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}
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Wish---

Post by *Clo »

2Andre Linoge

:) Hello !

• I guess that you didn't get me :
PANELS_RATIO <20/80> is just a wish¦proposal, this doesn't exist (yet) of course… :|

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

You should also declare hh as local and warn about the usage of flag n°1 used.
Right. This was one of my first scripts published 5 years ago on the Russian site only. One guy dared me to write it ;), and I couldn't imagine that somebody needs it.
Frankly, these are not severe errors, and are critical for people who uses PowerPro widely. I think it is not the case.
Single user license #329241
PowerPro scripts for Total Commander
Andre Linoge
Junior Member
Junior Member
Posts: 83
Joined: 2004-03-14, 22:22 UTC

Re: Wish---

Post by *Andre Linoge »

Clo wrote:2Andre Linoge

:) Hello !

• I guess that you didn't get me :
PANELS_RATIO <20/80> is just a wish¦proposal, this doesn't exist (yet) of course… :|

:mrgreen: KR
Claude
Clo
Ah, right. So thats why it didnt work. It was to good to be true. :D
Andre Linoge
Junior Member
Junior Member
Posts: 83
Joined: 2004-03-14, 22:22 UTC

Post by *Andre Linoge »

Vochomurka wrote:Just replace

Code: Select all

C:\Program Files\Software\Tools\Total Commander\TOTALCMD.EXE
with

Code: Select all

C:\Program Files\PowerPro\PowerPro.exe
(it is the default path, check whether it is valid).

and

Code: Select all

C:\Program Files\Software\Tools\Total Commander\script\windowpane.txt("%P", "5")
with

Code: Select all

runfile.windowpane
Note that:
1. No parameter is required;
2. No file extension must be specified;
3. Plugins win.dll and childwin.dll must be in your plugins\ subfolder.

All that is said here.

Please tell me about your results.
I have done all there is, without succes, but i suppose for this to work, Powerpro should be installed aswell??!!
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

Yes. And (I forgot to say) also you should better have a computer ;)
Single user license #329241
PowerPro scripts for Total Commander
User avatar
nsp
Power Member
Power Member
Posts: 1804
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

Vochomurka wrote:.....
Frankly, these are not severe errors, and are critical for people who uses PowerPro widely. I think it is not the case.
You are totally right ! :P
Andre Linoge
Junior Member
Junior Member
Posts: 83
Joined: 2004-03-14, 22:22 UTC

Post by *Andre Linoge »

Vochomurka wrote:Yes. And (I forgot to say) also you should better have a computer ;)
Now, what is that supposed to mean!! :shock: For your information, i fixed it. :P

First i installed PowerPro (again), placed, (after copying NSP's code)
the script into PowerPro's Script folder (not the Plugins folder), added childwin.dll and tc.dll in PowerPro's Plugins folder and pushed the button, and it worked like a charm. The only bummer was the 20% was on the rightside, so i changed local Where = 7 back to local Where = 1 now i have the screen as i need it 20/80.

Thanks for the help, gents. :wink:
Now i have to re-configure PowerPro again. :D
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Who knows ?

Post by *Clo »

2Andre Linoge

:) Again…
It was too good to be true.
• But sometimes, the dreams come true… Who knows ? ;)

Please check mail…

:mrgreen: KR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Post Reply