Detach / Attach consoles

May 26, 2008
492
3
#1
Is there a way to detach or attach console programs to TCMD using TCC commands? I took a glance through the help file but didn't see anything. (There is a DETACH command but it's not what I'm looking for.)

I would like to attach certain console programs to TCMD in tcstart.btm (like all cmd or powershell processes). And having a way to close TCMD but detach all console apps may also be useful.

If this is not currently possible, I can submit a suggestion in the feedback area.
 
May 26, 2008
492
3
#3
Isn't DETACH used to start a new console program? Is there a command to detach an existing console program currently linked to TCMD? Similar to right clicking the tab and selecting "Detach Tab".

Similarly ACTIVATE doesn't sound like it's similar to the "Attach Tab" function in TCMD.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,602
46
Albuquerque, NM
prospero.unm.edu
#5
TakeCommandIPC() has a couple of documented functions DETACH and START, which ought to be usable in a plugin. It's been a while since I played with them, but here's what I seem to remember.

I think DETACH worked as expected for me. I had difficulties with START, though. First of all, it expects at least two arguments, not the one documented. The second, undocumented, parameter might or might not be a window handle. Second, I think START did not work unless at least one console window had been previously attached 'by hand'. And there may have been further difficulties with consoles opened under other user accounts. Sorry I can't be more specific; it's been months since I played with this and I never got the plugin to where I was satisfied with it.
 
May 26, 2008
492
3
#6
Hmm... WINDOW DETACH works for the current TCC process. It would be kind of cool to be able to detach other console windows, and attach other console programs (perhaps based on executable name).