[REQ] cm-commands for seperator positions (20/80, 30/70,...)

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

[REQ] cm-commands for seperator positions (20/80, 30/70,...)

Post by *StickyNomad »

[EDIT]
I figured out a humble workaround, see last post.
[/EDIT]

currently, AFAIK it's only possible to adjust the position of the file panel seperator with the mouse by moving the seperator itself or by invoking its context menu. Until now this worked OK for me, but with the new custom columns and Thumbnail view, I change the panel width much more often and would really appreciate the possibility to do this with keyboard shortcuts.

Please, would it be possible to add cm-commands to TC (according to the existing 'cm_50percent') to set the seperator to the positions listed in its context menu ('cm_20percent','cm_30percent',...) so that Keyboard shortcuts could be assigned to them?

I think the programming efforts for this should be quite negligible (but don't kick me if I'm wrong), and this would make working with TC even more convenient than it is already.

P.S.
Maybe it could also be useful to have a 'cm_0percent'/'cm_100percent' command to temporarily have only the left/right file panel spreading the whole width of TC's window.
Last edited by StickyNomad on 2005-02-24, 01:48 UTC, edited 1 time in total.
User avatar
Stitscher
Power Member
Power Member
Posts: 1058
Joined: 2004-02-17, 12:34 UTC
Location: Hamburg, Germany

Post by *Stitscher »

Support++
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

In an old thread this was already discussed.

So I suggest an idea of this thread again:

Code: Select all

Command: cm_percent
Parameter: 0-1000 (to set the width)
Or perhaps

Code: Select all

cm_LeftPercent 
cm_RightPercent
sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
franck8244
Power Member
Power Member
Posts: 704
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Re: [REQ] cm-commands for seperator positions (20/80, 30/70,

Post by *franck8244 »

StickyNomad wrote:currently, AFAIK it's only possible to adjust the position of the file panel seperator with the mouse by moving the seperator itself or by invoking its context menu. Until now this worked OK for me, but with the new custom columns and Thumbnail view, I change the panel width much more often and would really appreciate the possibility to do this with keyboard shortcuts.
As a workaround :
This can be done with TCScript Editor ... search the forum and you'll find my code...
TC#88260 -
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2franck8244
Thanks a lot, I found your example. Until the commands finally will be implemented (as I still hope very much!), this may be a workaround indeed.

2Sheepdog
Command: cm_percent
Parameter: 0-1000 (to set the width)
yes, this would be even more comfortable! Full support.
User avatar
van Dusen
Power Member
Power Member
Posts: 684
Joined: 2004-09-16, 19:30 UTC
Location: Sinzig (Rhein), Germany

Post by *van Dusen »

2StickyNomad
As a workaround you could use some scripts for AZscript-Addon.
Example for setting the window divider to 80/20 at a 1280*1024 screen:

Code: Select all

// #define VK_RBUTTON 2
#define VK_RETURN 13
#define VK_UP 38
#define VK_DOWN 40
// 
// I don't know how to check, how panels are aligned at start :'-(
// Assume, you already got a vertical divider (otherwise uncomment the following line)
// PostCmd(cm_VerticalPanels);
PostCmd(cm_Maximize);
PostCmd(cm_50percent);
// 
// I don't know how to get information about the screen resolution :'-(
// Assume, your screen resolution is 1280*1024, let's set the mouse cursor to the middle of the screen...
SetCursorPos(640, 512);
// Open divider's context menu (RMB click)
MouseClick(1);
// 
// Press 1*<DOWN> to select "20/80"-entry in context menu
// SendVKey(40, 2);
// Press 2*<DOWN> to select "30/70"-entry in context menu
// SendVKey(40, 2);
// Press 3*<DOWN> to select "40/60"-entry in context menu
// SendVKey(40, 2);
// 
// Press 1*<UP> to select "80/20"-entry in context menu
SendVKey(38, 2);
// Press 2*<UP> to select "70/30"-entry in context menu
// SendVKey(38, 2);
// Press 3*<UP> to select "60/40"-entry in context menu
// SendVKey(38, 2);
// 
// Press <RETURN> to confirm
SendVKey(13, 2);
// 
// I don't know how to check TC window's initial state (minimized? maximized? normal?) ;'-(
// Assume, you are satisfied with a maximized TC window after script execution ;-)
// PostCmd(cm_Restore);
(it's not very sophisticated, i know :oops: ...but it works)
User avatar
franck8244
Power Member
Power Member
Posts: 704
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

2Van Dusen

The code I proposed was nearly the same ...

but you can simplify the part below the mouseclick(1) :

simply use : sendVKey(VK_NUMPADX,2);

where X is the 1st digit of the combinaison ou want to use :wink: ->no need to validate with sendvkey(13,2) ...
TC#88260 -
User avatar
van Dusen
Power Member
Power Member
Posts: 684
Joined: 2004-09-16, 19:30 UTC
Location: Sinzig (Rhein), Germany

Post by *van Dusen »

2franck8244
Thank you! :-)

2all
I'd like to offer two (rather ugly) ICO-files (32*32) for the button bar:

Fenster_L50R50.uue:

Code: Select all

begin 644 Fenster_L50R50.ico
M```!``$`("````0`!`#H`@``%@```"@````@````0`````$`!```````@`(`
M````````````````````````````YI(O`(\_#P"U:38`VM6Y`->A:0#.<`X`
MIDP=`-UZ#@`T:OP`!P,$`&PR'`#[_OP`R)9T`"`>(`#LH40`````````````
M````````````````````````````````````````````````````"JJJJJJJ
MJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJIR(B(B(B(B(B(B(B(B(BNJ=W=W
M=W=W=W=W=W=W=W=WZCS,S,S,S,S,S,S,S,S,S>H\S,S,S,S,S,S,S,S,S,VJ
M/,S,S,S,S,S,S,S,S,S-JCS,S,S,S,S,S,S,S,S,S:H\S,S,S,S,RLS,S,S,
MS,VJ/,RJS,JLS,K,S*K,RJS-JCS*S*RLRLS*S,K,K*S*Q:H\S,RLK,K,RLS,
MS*RLRL6J/,S,K*S*S,K,S,RLK,K%JCS*JLRLRLS*S,JJS*S*Q:ILRLS,K,K,
MRLS*S,RLRL6J;,RLS*S*S,K,S*S,K,K%JFS,JJS*K,S*S,RJK,JLQ:ILS,S,
MS,S,RLS,S,S,S,6J;,S,S,S,S,S,S,S,S,S%JHS,S,S,S,S,S,S,S,S,Q:J,
MS,S,S,S,S,S,S,S,S,6J',S,S,S,S,S,S,S,S,S%JH1$S,S,S,S,S,S,S$1$
M0>IW<B(B(B(B(B(B)W)W(G?J-F9F9F9F9F9F9F'V_SF6ZF'___'Q'___$1$1
M$?\9F.J(B(B(B(B(B(B(AFAFB(:@````````````````````````````````
M``````````#_______________^`````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````'_________
!_P``
`
end
sum -r/size 39235/766
Fenster_L80R20.uue:

Code: Select all

begin 644 Fenster_L80R20.ico
M```!``$`("````0`!`#H`@``%@```"@````@````0`````$`!```````@`(`
M````````````````````````````YHXO`(\_#P"U:38`VM&Y`->=:0#.<`X`
MIDP=`-UZ#@`T:OP`!P,$`&PR'`#[^OP`R))T`"`>(`#LG40`````````````
M````````````````````````````````````````````````````"JJJJJJJ
MJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJIR(B(B(B(B(B(B(B(B(BNJ=W=W
M=W=W=W=W=W=W=W=WZCS,S,S,S,S,S,S,S,S,S>H\S,S,S,S,S,S,S,S,S,VJ
M/,S,S,S,S,S,S,S,S,S-JCS,S,S,S,S,S,S,S,S,S:H\S,S,S,S,RLS,S,S,
MS,VJ/,RJS,JLS,K,RJJLRJS-JCS*S*RLRLS*S,K,S*S*Q:H\RLRLK,K,RLS,
MK,RLRL6J/,K,K*S*S,K,S,K,K,K%JCS,JLRLRLS*S,S,K*S*Q:ILRLRLK,K,
MRLS,S*RLRL6J;,K,K*S*S,K,RLRLK,K%JFS,JLS*K,S*S,RJS,JLQ:ILS,S,
MS,S,RLS,S,S,S,6J;,S,S,S,S,S,S,S,S,S%JHS,S,S,S,S,S,S,S,S,Q:J,
MS,S,S,S,S,S,S,S,S,6JC,S,S,S,S,S,S,S,S,S%JH1$S,S,S,S,S,S,S$1$
M0>IW<B(B(B(B(B(B)W)W(G?J-F9F9F9F9F9F9F'V_SF6ZF'___'Q'___$1$1
M$?\9F.J(B(B(B(B(B(B(AFAFB(:@````````````````````````````````
M``````````#_______________^`````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````'_________
!_P``
`
end
sum -r/size 38387/766
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

I suggested this long time ago here. Support again!
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2Raymond
I hope the right people will hear our calls... :)
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

Well, meanwhile I helped myself:

I played around a bit with AutoIt (which seems to be really great BTW!) and made a compiled script to set TCs window seperator to the positions available in the seperators context menu (20/80, 30/70,...) So that you can insert a button or a start menu command to have the window divided in your desired ratio.
Note: don't wonder about the compiled scripts size (~120K), these are the AutoIt runtimes etc. to run the script w/o having AutoIt installed

Get the Script (with source) Here

A readme is included, maybe it could be useful for some of you

HINT: I didn't test this one excessively, so don't punch me if strange things will happen, though it should work fine.
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

To StickyNomad
Just FYI, TC script can also do this, this thread alread gives the method.
What I really miss is to widen CURRENT panel automatically. I mean when I'm in left panel it changes to 80/20, when I'm in right panel it changes to 20/80. TC script can't do this. Is it possible your AutoIt script add this feature?
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

2Raymond
Just FYI, TC script can also do this, this thread alread gives the method.
thanks, I know this one. But with autoIt its way faster and no workarounds with maximizing TC first are necessary.
TC script can't do this. Is it possible your AutoIt script add this feature?
Hm, maybe, I just started to experiment with AutoIt, so I merely scratched the surface of the possibilites of this certainly extremely powerful tool.
Raymond
Senior Member
Senior Member
Posts: 454
Joined: 2003-02-08, 15:43 UTC

Post by *Raymond »

Here is my try.
Widen current panel. It means if you're in left panel and give a param 8, it will split to 80/20, if you're in right panel it will split to 20/80.
I should thank StickyNomad. I learnt and simply altered from his/her script file.

Code: Select all

If $CmdLine[0] = 0 Then Exit
ControlClick ( "Total Commander", "", "TPanel1", "right" )
If ControlGetFocus ( "Total Commander" ) = "TMyListBox2" Then
ControlSend  ( "", "", "TPanel1", $CmdLine[1] )
Else
ControlSend  ( "", "", "TPanel1", 10 - $CmdLine[1] )
EndIf
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

I should thank StickyNomad.
Well, I'm glad that you could benefit from my little script.
I learnt and simply altered from his/her script file.
actually it's HIS, for AFAIK I'm male :D
Post Reply