nsp wrote:
What you can do is a small TC Launcher/Wrapper that sets the TC instance variable before launching TC and reuse it.
Yes, thank you. We discussed that earlier in this thread in the form of a shortcut/launcher. I'm less interested in that approach.
If you want get info at load time before plugin list is even loaded. It as either to be implemented inside TC (as you ask) or externally using your own wrapper.
I understand the first option, which is the learning MVV's dll uncovered. I'm not sure what you mean by "your own wrapper".
sgp wrote:I understand the first option, which is the learning MVV's dll uncovered. I'm not sure what you mean by "your own wrapper".
I mean a programm that launch TC for you and track instance number setting COMMANDER_INSTANCE in the environment where tc will be launched.
This is a way to have it quickly you can use some nsis/installer script or any programming language that have easy access to env variable and process list....
ZoSTeR,
What if I start 10 instances and then close first 3, and then run your script? It will give number 8 but TC will use number 1.
There are a lot of other things that do matter here. E.g. 64-bit instances are also counted. It should be clear what to do with processes running in different desktops or under another user accounts or elevated...
Which approach is flawed?
And thank you for your script, even if it isn't what I'm looking for anyway (see below).
@nsp Any tracking mechanism that's external to TC will not work in a wincmd.ini RedirectSection= value, that's what experimenting with MVV's dll uncovered.
Last edited by sgp on 2015-01-16, 13:04 UTC, edited 1 time in total.
MVV wrote:ZoSTeR,
What if I start 10 instances and then close first 3, and then run your script? It will give number 8 but TC will use number 1.
There are a lot of other things that do matter here. E.g. 64-bit instances are also counted. It should be clear what to do with processes running in different desktops or under another user accounts or elevated...
... I was not aware of those as i do not use multiple TC instance.
but if you have "the right algorithm" either that mimic TC or thast fits sgp requirement all is fine !
To know how TC give the instance number, Christian is the one that can share.
Just use a shortcut/alias to load a set of tabs, using the instance number in the title-bar.
E.g Shortcut/Alias launches script, script checks parent-TC window's title, stores the instance number and then sends the command LOADTABS (or whatever its called) to TC.
--> LOADTABS FOOBAR1
--> LOADTABS FOOBAR2
Or do something similiar with MVV's DLL, and load the tabs after the TC instance is running, instead of trying to do so at launch.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
Balderstrom wrote:Just use a shortcut/alias to load a set of tabs, using the instance number in the title-bar.
E.g Shortcut/Alias launches script, script checks parent-TC window's title, stores the instance number and then sends the command LOADTABS (or whatever its called) to TC.
--> LOADTABS FOOBAR1
--> LOADTABS FOOBAR2
Or do something similiar with MVV's DLL, and load the tabs after the TC instance is running, instead of trying to do so at launch.
THe problem is not to load tab but rather to save tabs ...
A pretty minor script could be used launched via a TC alias that uses the INSTANCE variable - if thats what MVV's script creates. If not it could just grab the number from TC's title, and include the INSTANCE# in the saved-tabs filename.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.