How to save 2 or 3 different Window Position?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Axxy
Junior Member
Junior Member
Posts: 17
Joined: 2004-09-14, 15:57 UTC
Location: UK

How to save 2 or 3 different Window Position?

Post by *Axxy »

Is there anyway possible to Save Position and have 2 or 3 different Window configurations to choose between instead of re-sizing every time, depending on what I'm doing at the time?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Well, with just TC - no. But you can use some scripting tools like TCFS2 or AHK/PPro/etc.
bobputnam
Junior Member
Junior Member
Posts: 77
Joined: 2003-05-26, 12:31 UTC
Location: Connecticut, USA

Post by *bobputnam »

There's this:
http://www.ghisler.ch/wiki/index.php/Command_line_parameters

or you can (multiple) install TC in 3 different folders, each with its own configuration files.
Bob P
3-User License 71012
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

bobputnam,
Separate INI files is not a best option when only window positions should differ.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50918
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Total Commander 9 will support %COMMANDER_INSTANCE% to allow this via redirected ini sections. Currently you can do it via separate ini files, or try to set an environment variable before starting TC, and then redirect the correct section for the current resolution, e.g.:
[1280x1024 (8x16)]
RedirectSection=c:\totalcmd\wincmd%instance%.ini
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler,
And will there be any command line switch to start specific instance? Or will they work like now (with accepting minimum unused number)?
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

I don't quite understand how %COMMANDER_INSTANCE% will work. It seems the idea is to load a certain INI file for a certain ini file section. But what is the value behind the instance :?: Can someone explain?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think it is just a number of TC instance which TC displays in the title, so I don't see how one can start TC with specific settings using it.
batchman61
Junior Member
Junior Member
Posts: 44
Joined: 2003-02-07, 19:24 UTC
Location: Germany

Post by *batchman61 »

Hi,

I'm currently using environment variables set in a launcher PortableTotalCommander.cmd and make use of them in wincmd.ini like

[Configuration]
AlternateUserIni=%PORTABLE_SESSION_DIR%\%PORTABLE_SESSION%.ini

thus very interrested in all information about %COMMANDER_INSTANCE% !
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

I guess the 'instance' must be defined in a command-line parameter. Would that make sense?
batchman61
Junior Member
Junior Member
Posts: 44
Joined: 2003-02-07, 19:24 UTC
Location: Germany

Post by *batchman61 »

yes, an 'instance name' would be a perfect fit from my point of view.
Can be displayed in the window title instead of ['n'] then.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50918
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

%COMMANDER_INSTANCE% will contain the number shown in the title bar, or 1 if no number is shown there.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
%COMMANDER_INSTANCE% will contain the number shown in the title bar, or 1 if no number is shown there.
Your solution would mean I would have to start a certain number of TC instances in a certain order in order to get a certain configuration. Sounds really weird - or did I miss something?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50918
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

That's correct. He asked whether he could get different positions for different instances, and that's exactly where this would help: First started TC would show up at position 1, second at position 2 etc.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
He asked whether he could get different positions for different instances, and that's exactly where this would help: First started TC would show up at position 1, second at position 2 etc.
I can't find the word instance in his post.
Anyway I guess the way to solve the problem is to have 'Views' which can be saved and loaded. I guess this is already implemented for TC 9.

Having a general solution for different configurations for certain settings is a different story. Having the instance variable shouldn't be the only way. Having a parameter would be one way but there might be other like a overruling settings file.
Last edited by Lefteous on 2016-02-12, 09:37 UTC, edited 1 time in total.
Post Reply