how to maximize TC window EITHER vertically OR horizontally?

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

how to maximize TC window EITHER vertically OR horizontally?

Post by *StickyNomad »

Hi there,

does anybody know a decent way to achieve this? I would like to have this option to e.g. maximize the window to 100% of screen height when I use vertical panes, or to 100% of screen width to have more room when using quickview. Still, I want to have room to have other windows visible behind TC, so completely maximizing TC is not satisfying for me. I would also like an option to reset the Window to its initial size.

I tried the Tool 'actual Title buttons' which is quite nice, but it's not for free and does not exactly what i want. May be theres a way to do this with TC Script (with WndClass)? My dream are TC commands for these Functions in some later version...

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

Post by *Sheepdog »

I can imagine one way but it's a bit complicated (and I did not think to the end).

My idea is to start TC with another 'wincmd.ini' whre you can set the size in the dependent section e.g.
[1024x768 (8x16)]

dx=width of TC window in Pixels so 1024 is max width
dy=height of the TC woindow in pixels so 768 is max height

Youll have to copy the [left] and [right] and the [lefttabs] and [righttabs] sections to the new wincmd.iniand then restart TC with these values. To restore you only need to start with default wincmd.ini

As I said : just a thought and would have to worked out. But maybe a start...

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
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

Thanks for your tip, Sheepdog, this might be a start, but what I'm exactly looking for is a method to maximize the window temporarily and restore it again with one click, E.g. I'd like to be able to maximize the window horizontally, quickview some files and then go back to initial size without restarting TC.

I know, this may a quite exotic wish, but I'd use it quite often, if there was a possibility to max the window either horiz. or vert. with one click.

thanks again sheepdog, i think i'll have to search some 3rd party tool to achieve this or try around with TCScript. But if anyone had another idea, i'll be very thankful.

Greets,
User avatar
franck8244
Power Member
Power Member
Posts: 704
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

It's done :D

Here are two TC script to adjust the witdh...
You can easily modify them to play with the height

Those scripts modify the ini file so a restart is required (included in each script)...

->the first one to increase the width to 1280 (you'll have to set another value regarding your configuration)

Code: Select all

#include VKeys.h
#define CmdInterval 0
#define VK_F 70
#define VK_S 83

PostCmd(581);//Open Ini File
sleep(500);//Wait to have the TC ini and not the ftp...
//Search For " dx"
SendVkey(VK_CONTROL,1);
SendVKey(VK_F,2);
SendVkey(VK_CONTROL,0);
SendText("dx");
SendVKey(VK_RETURN,2);
SendVKey(VK_ESCAPE,2);

//Move after the " = "
SendVKey(VK_RIGHT,2);
//next lines are to set dx to "1280" !!
SendVKey(VK_NUMPAD1,2);
SendVKey(VK_NUMPAD2,2);
SendVKey(VK_NUMPAD8,2);
SendVKey(VK_NUMPAD0,2);
//push the good value to the line below
SendVKey(VK_RETURN,2);

//Save TC INI file
SendVKey(VK_CONTROL,1);
SendVKey(VK_S,2);
SendVKey(VK_CONTROL,0);
Sleep(250);
//Close TC INI file
SendVKey(VK_MENU,1);
SendVKey(VK_F4,2);
SendVKey(VK_MENU,0);
Sleep(250);

//Close FTP INI file
SendVKey(VK_MENU,1);
SendVKey(VK_F4,2);
SendVKey(VK_MENU,0);
Sleep(250);

//Restart TC

//Quit TotalCmd
PostCmd(cm_Exit);
//Executes TotalCmd. The variable "TotalCmdExe" is set automatically.
Exec(TotalCmdExe,"/N");
Sleep(250);
//Find TotalCmd's Window handles using our hosts command #0
HostCmd(0);
->The second to restore the previous width

Code: Select all

#include VKeys.h
#define CmdInterval 0
#define VK_F 70
#define VK_S 83

PostCmd(581); //Open INI file

sleep(500); //wait to have TC ini and not ftp ...
//Search "dx"
SendVkey(VK_CONTROL,1);
SendVKey(VK_F,2);
SendVkey(VK_CONTROL,0);
SendText("dx");
SendVKey(VK_RETURN,2);
SendVKey(VK_ESCAPE,2);

SendVKey(VK_RIGHT,2);//Move after the " = "

//Remove the "long" value and restore the old one
//There must be ONE delete more than the value
//(5 delete for 1280)
SendVKey(VK_DELETE,2);
SendVKey(VK_DELETE,2);
SendVKey(VK_DELETE,2);
SendVKey(VK_DELETE,2);
SendVKey(VK_DELETE,2);

//Save TC INI file
SendVKey(VK_CONTROL,1);
SendVKey(VK_S,2);
SendVKey(VK_CONTROL,0);
Sleep(250);
//Close TC INI file
SendVKey(VK_MENU,1);
SendVKey(VK_F4,2);
SendVKey(VK_MENU,0);
Sleep(250);

//Close FTP INI file
SendVKey(VK_MENU,1);
SendVKey(VK_F4,2);
SendVKey(VK_MENU,0);
Sleep(250);

//Restart TC

//Quit TotalCmd
PostCmd(cm_Exit);
//Executes TotalCmd. The variable "TotalCmdExe" is set automatically.
Exec(TotalCmdExe,"/N");
Sleep(250);
//Find TotalCmd's Window handles using our hosts command #0
HostCmd(0);
Enjoy :D

I tested them on my computer, you might have to increase the delay between the opening of ini file and the beginning of "work"

Though it works here I take no responsability ...

Be sure to backup your ini files before trying them
TC#88260 -
User avatar
StickyNomad
Power Member
Power Member
Posts: 1933
Joined: 2004-01-10, 00:15 UTC
Location: Germany

Post by *StickyNomad »

:D Wow, thank you franck8244!

This must have been quite a work, heavy thanks again! I'll try this and see if it will fit my needs. Though, restarting TC is a little bit annoying for me, but maybe i can live with that...

Meanwhile, i got some news in my corresponding german thread about a little program that seems very interesting. if you're interested, you can check the german thread (see lefteous' first post) for the download, though the program has no options to reset window size to original, it seems to be great when a little further developed.

Greets,
User avatar
franck8244
Power Member
Power Member
Posts: 704
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

Thanks for the link but I forgot german a long time ago :oops:

If you need any explanation on the script (or it's use), simply ask...
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 for the link but I forgot german a long time ago
As I forgot my french :D
So here's the download link for TCWindowManager.
Just start the exe within TC and it gets horizontally maximized instantly (i hope vertical max and restore size will be implemented by the author (lefteous) soon).
If you need any explanation on the script (or it's use), simply ask...
Thanks! I'll do if I need some help or find out something that may interest you.

Greets,
Post Reply