Take Command 32.10:
IDE / Batch Debugger:
Added support for creating & editing NTFS streams. The syntax is "filename.ext:streamname".
TCEDIT:
Added support for creating & editing NTFS streams. The syntax is "filename.ext:streamname".
New Internal Variables:
_BATCHLABEL - Returns the name of the current GOSUB subroutine. (Or an empty string if not in a subroutine.)
New Variable Functions:
@XHISTORY - Returns the matching XHISTORY line or field. The syntax is:
@XHISTORY[line, arg] where:
line - the # of the line to return. The most recent XHISTORY entry is line 0, the previous entry 1, etc.
arg - the XHISTORY argument to return:
0 - Timestamp
1 - Execution time
2 - Return code
3 - CWD
4 - Command
Updated Commands:
/G - now writes the progress % directly to the display instead of STDOUT.
DO / ITERATE
ITERATE n - if n is specified and > 0, ITERATE will exit n nested DO loops and then iterate the nth parent DO loop.
/G - Now writes the progress % directly to the display instead of STDOUT.
/N - Pop the directory off the stack, but don't change the directory.
/N - Push the directory onto the stack, but don't change the directory.
/Nj - Don't follow junctions / symlinks
The WATCH header now displays a timestamp before the command name.
/A - Highlights all changes between the current run and the first one,instead of the difference between the current and previous runs.
/B - Beeps if the return code != 0
/F - Freezes the display if hte output changed, and prompts you to enter a key to continue.
.
/U - Beep if the output changes
/X - Exits if the output changes
New Commands:
Returns the context of the current batch call, including the line number, (optional) subroutine label, and batch file or library name. The syntax is:
CALLER n
If n is not specified, CALLER displays the line number and batch file or library name for the current line. If n is specified, CALLER displays the line number, subroutine label (or "main" if not in a subroutine), and batch or library name. The n value for the current line is 0, the previous call in the program stack is 1, etc.
Replace the current TCC shell with the specified program. The syntax is:
EXEC command [args ...]
Returns 0 (and sets ERRORLEVEL to 0).
Search files for text. (FSEARCH is the replacement for the aged and soon-to-be-deprecated FFIND, and the options and syntax are almost identical. New features will only be implemented in FSEARCH, not FFIND. (FSEARCH is entirely new code; it doesn't share anything with FFIND.) The FSEARCH syntax is:
FSEARCH [/= /+n /-n /8 /B /C /E"regex" /F /G /H /I /L /N[dehjs] /Q /S[[+]n] /T"text" /U /V /Y /Z] [path] filename
/= - Display the FSEARCH dialog
/+n - Skip the first n matches
/-n - Stop after n matches
/8 - Instead of scanning the files for their type, they are assumed to be UTF8 (this is a little faster).
/B - Only display filenames (no header or footer or summary or matching lines)
/C - Match case
/E"..." - Regular expression search
/F - Stop after first match (overrides /V)
/G - Change to the directory containing the first matching file (also sets /F and overrides /V)
/H - Don't search for text in binary files. By default, this includes .exe, .dll, .sys, .chm, .zip, .pdb, .pch, .obj,
.tar, .com, and .ewriter. You can define your own list by setting the "BINARY_FILES" environment variable.
For example, to ignore .exe, .sys, and .dll files:
BINARY_FILES=.exe;.sys;.dll
/I - Used with /T to tell FSEARCH to ignore wildcard characters (*, ?, and [...]).
/L - Display line numbers for matching text
/N... - Disable options:
D - Don't scan hidden subdirectories
E - Don't display errors
H - No header
J - Skip junctions
S - No footer (summary)
/Q - Don't display any output. The internal variables (see below - _fsearch_errors, _fsearch_files, and _fsearch_matches are set).
/S - Search subdirectories of the specified (or default) path.
If you specify a number following the /S, FFIND will limit the subdirectory recursion to the number specified. For example, if you have a directory tree "\a\b\c\d\e", /S2 will only go to the "a", "b", and "c" directories.
If you specify a + followed by a number after the /S, FFIND will not search for files until it gets to that depth in the subdirectory tree. For example, if you have a directory tree \a\b\c\d\e, /S+2 will not find anything in \a or \a\b.
/T"..." - Search for the matching text. Supports TCC wildcards (?, *, and [...]).
/U - Only display summary line (no filenames or matching lines; overrides /V)
/V - Display all matching text (FFIND defaults to only displaying the first match in each file)
/Y - Display a "Continue Y/N" prompt after displaying each match
/Z - Highlight the matched text
FSEARCH will automatically determine the file type (ASCII, UTF8, or UTF16).
FSEARCH sets three internal variables:
_fsearch_errors - Errors when running FSEARCH (i.e., file/path not found, file locked, access denied, etc.)
_fsearch_files - The number of files containing one or more matches
_fsearch_matches - The total number of matches
Runs the specified internal command, ignoring any aliases, plugins, or external apps. The syntax is:
INTERNAL command args ...
If command is not an internal TCC command, INTERNAL will return an error.
Generates a random integer, bool, float, char, or string. The syntax is:
RANDOM /I start, end - Create an integer >= start and <= end. The start and end arguments are signed 64-bit values.
RANDOM /B - Create a boolean (0 or 1)
RANDOM /F start, end, precision - Create a floating point number >= start and <= end, with precision decimal places.
RANDOM /C start, end - Create a character between (inclusive) the characters start and end.
RANDOM /S start, end, length Create a string composed of characters between start and end (inclusive).
RANDOM /D n - Roll an n sided dice.
Returns 1 (and sets ERRORLEVEL to 1).
Take Command 32.0:
Take Command, TCC, CMDebug, and TCC-RT are built with a new version of Visual Studio.
Take Command:
Many security, performance & size improvements.
Added PowerShell Core to the predefined Apps list for the Run dialog and the Take Command Tabs configuration dialog.
Added support for 8K monitors.
TCC:
Many security, performance & size improvements.
Added support for 8K monitors.
Added support for Python 3.13.
Ctrl-Shift-PgUp or Ctrl-Shift-PgDn - pops up the new Extended History dialog (see XHISTORY below). (Can be redefined by changing XHistWinOpen in the OPTION / Keyboard / History dialog.) The Extended History displays and saves more information about the command than the original command history:
Timestamp - Date and time the command was executed
Run time - The elapsed time (in seconds.milliseconds format)
Return - The integer value returned by the command
CWD - The current working directory when the command was executed
Command - The original command line (before alias & variable expansion)
If you double-click on a history entry in the dialog or press Enter, TCC will run the selected command again. If you press Ctrl-Enter (or Ctrl-double click), TCC will copy the command to the command line, where you can edit the command before executing it.
If you press Shift-Enter (or Shift-double click), TCC will run the command in the directory specified by the CWD field, and then restore the original directory. You can combine the Ctrl and Shift keys; for example, Ctrl-Shift-Enter will display the command on the command line for further editing before changing the directory, executing the command, and restoring the original directory.
You can select multiple entries (with Ctrl-Click or Shift-Click). TCC will append the commands (separated with a &) before passing the result to the command line.
If the focus is on the listview, entering a number will go to the matching line number (Id, in the first column) in the extended history list.
A right-click on an entry in the list will display a drop-down context menu with the options:
Copy
Copy+Append
Cut
Delete
Extended History can be enabled / disabled from the OPTION / Command Line / Command History dialog.
The Edit field (upper left corner of the dialog) lets you search for matching lines in the directory history. Matching supports extended TCC wildcards and regular expressions. (Because of the different field options, this isn't an incremental search. You need to press Enter before the search is done and the extended history list is updated.) You can search on any of the extended history fields. If no field is specified, searches default to matching the command line.
ts=... | Match time stamp (yyyy-mm-dd hh:mm:ss) |
rt=... | Match run time (in seconds.milliseconds format) |
ret=n | Match return code (0 - 256) |
cwd=... | Match current working directory |
cmd=... | Match command line |
IDE / Batch Debugger:
Many security, performance & size improvements.
Added support for 8K monitors.
Improved the syntax styling performance for large files.
The editor now supports autocompletion for TCC or CMD command names, internal variables, and variable functions. To display the autocompletion dropdown, enter the partial name and then press Ctrl-Enter.
There are two new options in the File menu:
Save to HTML - saves the current file as an HTML file.
Save to XML - saves the current file as an XML file.
There is a new option in the View menu:
Mark max colum - Invokes a dialog box asking for a column #. Then draws a vertical line following that column in the edit window. This can be useful to identify overly-long lines.
TCEDIT:
Many security, performance & size improvements.
Added support for 8K monitors.
Improved the syntax styling performance for large files.
The editor now supports autocompletion for TCC or CMD command names, internal variables, and variable functions. To display the autocompletion dropdown, enter the partial name and then press Ctrl-Enter.
There are two new options in the File menu:
Save to HTML - saves the current file as an HTML file.
Save to XML - saves the current file as an XML file.
There is a new option in the View menu:
Mark max colum - Invokes a dialog box asking for a column #. Then draws a vertical line following that column in the edit window. This can be useful to identify overly-long lines.
Help:
Help for Take Command, TCC, and CMDebug is now available in English, French, German, and Spanish. You can download the help files from:
JP Software Downloads - Take Command, TCC, CMDebug, and TCC-RT
The eWriter file viewer has been updated to version 4.0, and the skin for the Take Command help has been rewritten.
The help is build with a new version of Help & Manual (9.4.1).
New TCMD.INI Directives:
XHCWD=n - Set the max length (in pixels) for the CWD column in the XHistory popup dialog. Defaults to 240. The XHistory dialog will set the CWD column to the XHCWD value or the maximum directory length, whichever is lesser.
Updated Commands:
/F["..."] Erase entries in the directory history list. You can have multiple /F"..." arguments, and they can contain wildcards. If you don't include the optional quoted argument, /F will erase the entire list. |
The Keyboard page has new key entries under Extended History:
XHistWinOpen (defaults to Ctrl-Shift-PgUp and Ctrl-Shift-PgDn) - pops up the new Extended History dialog (see XHISTORY below)
XHistDelete (default Ctrl-D) - keyboard shortcut to delete selected entries in the Extended History dialog.
XHistEdit (default Ctrl-E) - keyboard shortcut to edit the current selected entry in the Extended History dialog.
XHistSearch (default Ctrl-S) - keyboard shortcut to edit the search string in the Extended History dialog.
New Commands:
Run command(s) repeatedly, displaying the output and highlighting the difference(s) from the last run. WATCH allows you to see how program output changes over time.
The syntax is:
WATCH [/C /D /Hn /In /Mn /Nf /Nh /R"regex" /Tn /V] "command ..."
/C | Clear the display and home the cursor before each run |
/D | Disable the highlight colorization |
/Hn | Display only the leading n lines |
/In | Interval (in seconds) between each run |
/Mn | Maximum number of times to run the command |
/Nf | Disable the WATCH footer |
/Nh | Disable the WATCH header |
/R"regex" | Only display the output lines that match the regular expression |
/Tn | Display only the trailing n lines |
/V | Verbose output (header and footer) |
Command | Command(s) to execute |
Command can be an internal command, alias, batch file, or an external application.
Note that you need to double your %'s if you want the variables to be expanded by the specified commands instead of by WATCH.
An extended command history that saves the command line, the current working directory, the return code, the total runtime (millisecond resolution), and the date/time stamp. Extended history does not replace the existing command history. XHISTORY can either display / modify the extended history, or bring up a dialog box that allows you to view / edit / select entries. (Also see Ctrl-Shift-PgUp above.)
The syntax is:
XHISTORY [OFF | ON][/D/ F"..." | /M"..." | /Nf /Nh /Q]
OFF - Disable extended history
ON - Enable extended history (extended history can also be enabled / disabled in the OPTION dialog on the Command Line page)
/D - Display the XHistory dialog. You can view, edit, delete, or (re)execute commands.
/F"..." Delete matching lines in the directory history. Matching supports extended TCC wildcards and regular expressions. You can search on any field:
/F"ts=..." | Match time stamp (yyyy-mm-dd hh:mm:ss) |
/F"rt=..." | Match run time (in seconds.milliseconds format) |
/F"ret=n" | Match return code (0 - 256) |
/F"cwd=..." | Match current working directory |
/F"cmd=..." | Match command line |
/M"..." Find matching lines in the directory history. Matching supports extended TCC wildcards and regular expressions. You can search on any field:
/M"ts=..." | Match time stamp (yyyy-mm-dd hh:mm:ss) |
/M"rt=..." | Match run time (in seconds.milliseconds format) |
/M"ret=n" | Match return code (0 - 256) |
/M"cwd=..." | Match current working directory |
/M"cmd=..." | Match command line |
/Nh - Don't display the header
/Nf - Don't display the footer
/Q - Don't display matching extended history entries for /F and /M.