Welcome!

By registering with us, you'll be able to discuss, share and exchange private messages with other members of our community.

SignUp Now!

WINDOW DETACH

Aug
1,821
59
Code:
     _x64: 1
   _admin: 1
_elevated: 1

TCC  28.02.18 x64   Windows 10 [Version 10.0.19043.1466]
BuildNumber  Caption                   CSDVersion  OSArchitecture  Version
19043        Microsoft Windows 10 Pro              64-bit          10.0.19043

I have TCMD open, with two TCC tabs;
Code:
e:\utils>tasklist /lm tcc
21012    114638848  tcc               "C:\Program Files\JPSoft\TCMD28\tcc.exe"
24092*   115175424  tcc               "C:\Program Files\JPSoft\TCMD28\tcc.exe"

   Total of 2 processes

Executing WINDOW DETACH causes the tab window to detach, but it just hangs there.

However, it is TMCD that is hung.
1644182430987.png


I select "Close the program". TCMD closes, and the window that I detached becomes responsive.

TASKLIST still shows the two TCC sessions;
Code:
e:\utils>tasklist /lm tcc
21012     57176064  tcc               "C:\Program Files\JPSoft\TCMD28\tcc.exe"
24092*    63807488  tcc               "C:\Program Files\JPSoft\TCMD28\tcc.exe"

I launch TCMD again, which works as normal, and I can use my recently detached window.

Note well that if I manually right-click on a TCMD tab window, and select Detach, I have no issues.

Can anyone else duplicate this issue?

Joe
 
I gave it a try a few days ago. WINDOW DETACH did nothing: the tab remained in TCMD (I tried several times).
Trying again today: the tab detaches, and the resulting console window works properly (as it should, and as I had always seen until recently). Looks like there is some problem sometimes, but I can say the exact circumstances.
 
Thanks @Christian Albaret for the reply.

I created a very crude .BTM, incorporating an AutoHotKey script, that detaches a tab window from TCMD.

Code:
@setlocal
@echo off

unset results

iff %_tcmdinstances eq 0 then
  echo This .BTM must be run from within TCMD,
    echo   in order to detach a window.
    quit
endiff

iff %_tctabs eq 0 then
  echo This .BTM must be run from within TCMD,
    echo   in order to detach a window.
    quit
endiff

::
:: Create the detach.ahk AutoHotKey script
::
echo #SingleInstance Force > e:\utils\detach.ahk
echo F9::Send {RAlt}+{t}+{d}+{enter} >> e:\utils\detach.ahk
::
:: Start the detach.ahk AutoHotKey script
::
e:\utils\detach.ahk

iff %_tctabs gt 1 then
  echo Okay to detach window.
    
  do until %_TCTABACTIVE eq 0 then
      keystack f9
        delay /B 1 
    enddo
else
  if %_tctabs ne 0 pause /W5 /C /T Not enough tab windows open.
    quit
endiff

set thePID=%@pid[AutoHotkey.exe]
set thePIDCommand=%@pidcommand[%thePID]
iff %@Right[10,%thePIDCommand] eq detach.ahk then
  :: NEXT SENTENCE
else
  echo Could not find detach.ahk
  quit
endiff

set thePID=%@pid[AutoHotkey.exe]
if %_TCTABACTIVE eq 1 StatusBar Killing process started with e:\utils\detach.ahk
iff %thePID gt 0 then
  set results=%@execstr[taskkill /pid %thePID /t /f]
  toast /template=5 /text1="detach.ahk" /text2="%results" /duration=0
endiff
    
iff %_TCTABACTIVE eq 0 then
  mode 80,25
    keystack LWin-up
    if not plugin 4Console plugin /l 4Console64.dll
endiff

endlocal

It does what I need, but hopefully @rconn can duplicate the WINDOW DETACH problem, and see what is going on.

Joe
 

Similar threads

Back
Top