1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to get a TC interface instead of a console for .btm, .bat, ?

Discussion in 'Support' started by Mordachai, May 11, 2013.

  1. Mordachai

    Joined:
    May 9, 2013
    Messages:
    40
    Likes Received:
    0
    After successfully running tccbatch, when I double click a .bat file, I get a console host window.

    I can run TC - and if I have "automatically attach consoles" setting on, it will grab the console into a tab.

    But how can I make it always start TC in the first place?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,804
    Likes Received:
    82
    You need to run TCMDBATCH.BTM if you want to associate batch files with Take Command. (TCCBATCH.BTM associates them with TCC.)
     
  3. Mordachai

    Joined:
    May 9, 2013
    Messages:
    40
    Likes Received:
    0
    Where would I find such a file?

    Code:
     Directory of  C:\Program Files\JP Software\Take Command x64 15.01\*.btm
     
    1/09/2013  13:13          1,002  tccbatch.btm
    4/03/2013  9:12          1,170  tcchere.btm
    1/09/2013  13:13          1,272  tcctabhere.btm
    4/03/2013  9:17          1,204  tcmdhere.btm
                4,648 bytes in 4 files and 0 dirs    16,384 bytes allocated

    I could probably synthesize a tcmdbatch.btm, but I assume there is one provided someplace?

    NOTE: code-blocks in the forum should default to a fixed-space font (lucida console?)
     
  4. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    564
    Likes Received:
    8
    I'm pretty sure that it is a monospaced font. Only problem is that sometimes it loses spaces in the pasted text.
     
    Mordachai likes this.
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4


    We don't have a DWIM editor - you need to inform it where a code block starts or ends. You can do this with the modified HTML tags
    Code:
     and 
    , respectively. I do wish though that shortcut keys were available...
     
  6. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,287
    Likes Received:
    39
    He did use a CODE block. I don't know why those columns don't quite line up, but it may be relevant that the missing spaces happen in rows containing a time with a one-digit hour.
     
  7. Mordachai

    Joined:
    May 9, 2013
    Messages:
    40
    Likes Received:
    0
    I just copied / pasted from a TCC window. I assumed the misalignment was due to variable width font - but apparently that's not the case. Not sure what caused it?
     
  8. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    Sorry, I responded to the posted message, and failed to "escape" the "code" / "/code" format tags, thus creating a hard to read post.

    I always use ISO timestamps, never seen this vertical misalignment. However, I have seen leading and multiple space suppression, but do not recall exact circumstances.
     
  9. Mordachai

    Joined:
    May 9, 2013
    Messages:
    40
    Likes Received:
    0
    So this thread becomes:

    [BUG] tcmdbatch.btm IS MISSING FROM TC 15.01
    Code:
    Directory of  C:\Program Files\JP Software\Take Command x64 15.01\*.btm
     
    1/09/2013  13:13          1,002  tccbatch.btm
    4/03/2013  9:12          1,170  tcchere.btm
    1/09/2013  13:13          1,272  tcctabhere.btm
    4/03/2013  9:17          1,204  tcmdhere.btm
                4,648 bytes in 4 files and 0 dirs    16,384 bytes allocated
    
     
  10. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,188
    Likes Received:
    11
    I have a version that came with TCMD 13. Here it is. Copy this to TCMDBatch.btm.
    Code:
    @echo off
    rem  TCMDBatch.btm
    rem  This batch file associates .BAT, .BTM, and .CMD files to Take Command
     
    iff %_dosver ge 6.0 then
        echo If you are running Windows Vista, you must first start a Take Command
        echo session as an administrator (right click on the TCMD icon and select
        echo "Run as administrator") echo and then run TCMDBatch.btm in that session.
    endiff
     
    echo.
    echos Do you want to make Take Command the default handler for .BAT files [Y/N] ?
    inkey /k"yn[enter]" %%var
     
    iff "%var" eq "y" then
    assoc .bat=batfile
    ftype batfile="%@path[%_cmdspec]tcmd.exe" /c "%%1" %%*
    endiff
     
    echo.
    echos Do you want to make Take Command the default handler for .BTM files [Y/N] ?
    inkey /k"yn[enter]" %%var
     
    iff "%var" eq "y" then
    assoc .btm=TCMD.Batch
    ftype TCMD.Batch="%@path[%_cmdspec]tcmd.exe" /c "%%1" %%*
    endiff
     
    echo.
    echos Do you want to make Take Command the default handler for .CMD files [Y/N] ?
    inkey /k"yn[enter]" %%var
     
    iff "%var" eq "y" then
    assoc .cmd=cmdfile
    ftype cmdfile="%@path[%_cmdspec]tcmd.exe" /c "%%1" %%*
    endiff
    
     
    Mordachai likes this.
  11. Mordachai

    Joined:
    May 9, 2013
    Messages:
    40
    Likes Received:
    0
    Thanks! That appears to work nicely :)
     

Share This Page