Take Command 23.0:

 

Installer:

 

Take Command is using new version of Advanced Installer.

 

 

Take Command:

 

Version 23 is using a new version of the GUI framework library.

 

Version 23 is using a new version of Scintilla.

 

TCMD has a macro recorder that will record and play back keystrokes and mouse actions. You can control the macro recorder several ways:

 

1.Win-F11 - Start / stop macro recording

2.Win-F12 - Start / stop macro playback

3.Record & Playback buttons on the Quick Access toolbar

4.Record & Playback buttons on the Take Command Tools menu

5.The new TCC RECORDER internal command

 

The Command Input window now supports syntax coloring for command line input, using the same colors and keywords as the IDE / batch debugger.

 

The "Restarted Elevated" option in the Home menu will detach the tabs, start a new elevated Take Command session, and reattach the tabs in that session.

 

If you select "Attach Tabs" from the tab context menu, and (1) there is only one unattached console window, and (2) it is visible, it will automatically be attached without having to select it from the dialog.

 

The status bar has a new "Screen buffer size (Rows)" field.

 

The tab window context menu (right click) has three new options:

 

Read-only Tabs - Disable keyboard input in this tab.

 

New Horizontal Tab Group - move the current tab window into a new vertical tab group.

 

New Vertical Tab Group - move the current tab window into a new horizontal tab group.

 

Take Command has a number of screen drawing improvements related to custom font sizes and DPI scaling.

 

TCMDHere.btm now automatically restarts itself elevated if necessary, and has a /U option to remove the "TCMD prompt here" entry from the Windows Explorer context menu.

 

TCCTabHere.btm now automatically restarts itself elevated if necessary, and has a /U option to remove the "TCC  tab window here" entry from the Windows Explorer context menu.

 

 

TCC:

 

Version 23 is using a new version of the Onigmo regular expression library.

 

TCC now supports syntax coloring on the command line (similar to the syntax coloring in the IDE / batch debugger). You set the option and the colors to use in the OPTION / Windows dialog. You can define both foreground and background using any of the 16 Windows console colors. TCC will colorize:

 

Default - any text that doesn't match a syntax option

 

Commands - internal TCC commands

 

Aliases - command aliases defined with the TCC ALIAS command.

 

Comments - lines beginning with rem or ::

 

Labels - labels for a GOTO or GOSUB

 

Operators - | < > && || etc.

 

Batch / Local Vars - %1 - %n, %*, %~... etc.

 

Environment Vars - environment variables

 

Internal Vars - internal TCC variables and variable functions

 

Regexes - regular expressions

 

TCCHere.btm now automatically restarts itself elevated if necessary, and has a /U option to remove the "TCC prompt here" entry from the Windows Explorer context menu.

 

 

IDE / Batch Debugger:

 

Version 23 is using a new version of the GUI framework library.

 

Version 23 is using a new version of Scintilla.

 

The Tabs context menu (right click on a tab header) has three new options:

 

 Open Containing Folder  (opens a File Explorer window in the batch file's directory)

 Close

 Close All But This

 

If you are editing a variable name in the Watch window, the Delete (X) button will delete marked text in the edit control. Otherwise, X will delete the currently selected line in the watch list.

 

"Run to Cursor" is a new option in the Debug menu. If you click on a line in the debugger window, and then select "Run to Cursor", the debugger will run the batch file (ignoring any breakpoints) until it reaches the selected line.

 

 

Help:

 

The v23 help is built with a new version of the help compiler (Help & Manual).

 

The help has been expanded with more examples, tutorials, and key words.  

 

 

TMCD.INI Directives:

 

MacroRecorder=YES|no - Enable or disable the Take Command macro recorder. This directive goes in the [TakeCommand] section.

 

 

Command Line Editing:

 

See "Syntax Coloring" in the new TCC features above.

 

 

Variables:

 

You can return the result of a command with %(command).  This is the same as @EXEC[command] but a little easier to write.

 

%@ will return the batch file arguments (like %*), but they will all be double quoted.

 

Numeric variable expressions - %((...)) will evaluate and substitute the expression. For example:

 

echo %((3+5)) is the answer.

 

Conditional expressions - %[[...]] will evaluate the conditional expression, and return 0 if the exit status is true; 1 if it is not. For example:

 

echo %[[5 == 6]]

 

 

Updated Variable Functions:

 

@COMPARE - added support for HTTP & HTTPS.

 

@CRC32 - has three new optional parameters:

 

@CRC32[s f b,]file[,start[,length]]

 

bUse binary buffer (pass the handle returned by @BALLOC as the file parameter)
startStart position in binary buffer or file in bytes (defaults to 0)
lengthLength of buffer to hash in bytes (defaults to size of binary buffer or file)

 

@FILES - added support for exclusion ranges (i.e., @files[/!notthis.file] *.file])

 

@IF has new conditional tests:

 

ISLIBRARY - returns 1 if the name is a library function

 

ISSYMLINK - returns 1 if the filename is a symlink.

 

ISREADABLE - returns 1 if the file is readable.

 

ISWRITEABLE - returns 1 if the file is writeable.

 

@MD5 - has three new optional parameters:

 

@MD5[s f b,]file[,start[,length]]

 

bUse binary buffer (pass the handle returned by @BALLOC as the file parameter)
startStart position in binary buffer or file in bytes (defaults to 0)
lengthLength of buffer to hash in bytes (defaults to size of binary buffer or file)

 

@PING - now also supports IPv6 addresses. (In Windows 7, this will only work in an elevated session.)

 

@SEARCH - added support for regular expressions in the program name. @SEARCH will also now add double quotes to the returned filename if it contains whitespace or special characters.

 

@SHA1, @SHA256, @SHA384, @SHA512 - have three new optional parameters:

 

@SHA1[s f b,]file[,start[,length]]

 

bUse binary buffer (pass the handle returned by @BALLOC as the file parameter)
startStart position in binary buffer or file in bytes (defaults to 0)
lengthLength of buffer to hash in bytes (defaults to size of binary buffer or file)

 

 

New Variable Functions:

 

@BSIZE - Returns the size of a binary buffer. The syntax is:

 

@BSIZE[handle]

 

handleHandle returned by @BALLOC

 

@SERIALHW - Returns the serial number of a physical drive. The syntax is:

 

@SERIALHW[drive]

 

driveThe drive letter associated with the physical drive.

 

Returns a string with the drive letter, or an error if the drive doesn't exist or have a serial number.

 

@UNQCLOSE - Close a UnQLite database opened by @UNQOPEN. The syntax is:

 

@UNQCLOSE[filename]

 

Returns 0 if successful, or the error text if not.

 

@UNQDELETE - Delete a key/value pair from a UnQLite database. The syntax is:

 

@UNQDELETE[[u,]filename, key]

 

uOptional flag that the key is Unicode (UTF16)
filenameDatabase opened by @UNQOPEN
keyKey to delete

 

Returns 0 if successful, or the error text if not.

 

@UNQKVB- Add a key / binary blob value pair to a UnQLite database. The syntax is:

 

@UNQKVB[[u,]filename, "key", handle, length]

 

uOptional flag that the key and value are Unicode (UTF16)
filenameDatabase opened by @UNQOPEN
keyKey to add or replace
handleHandle to binary buffer (returned by @BALLOC)
lengthLength of buffer to write (or -1 for the entire buffer)

 

Returns 0 if successful, or the error text if not.

 

@UNQKVBA - Append to the value of an existing key / binary blob value pair. The syntax is:

 

@UNQKVBA[[u,]filename, "key", handle, length]

 

uOptional flag that the key and value are Unicode (UTF16)
filenameDatabase opened by @UNQOPEN
keyKey to update
handleHandle to binary buffer (returned by @BALLOC)
lengthLength of buffer to write (or -1 for the entire buffer)

 

Returns 0 if successful, or the error text if not.

 

@UNQKVF - Add a key / file value pair to a UnQLite database. The syntax is:

 

@UNQKVF[[u,]filename, "key", file, length]

 

uOptional flag that the key and value are Unicode (UTF16)
filenameDatabase opened by @UNQOPEN
keyKey to add or replace
fileName of the file to save to the key
lengthLength of the file to write (or -1 for the entire file)

 

Returns 0 if successful, or the error text if not.

 

@UNQKVFA - Append to the value of an existing key / file value pair. The syntax is:

 

@UNQKVFA[[u,]filename, "key", file, length]

 

uOptional flag that the key and value are Unicode (UTF16)
filenameDatabase opened by @UNQOPEN
keyKey to update
fileName of the file to save to the key
lengthLength of the file to write (or -1 for the entire file)

 

Returns 0 if successful, or the error text if not.

 

@UNQKVS - Add a key / string value pair to a UnQLite database. The syntax is:

 

@UNQKVS[[u,]filename, "key", "value"]

 

uOptional flag that the key and value are Unicode (UTF16)
filenameDatabase opened by @UNQOPEN
keyKey to add or replace
valueValue to add

 

Returns 0 if successful, or the error text if not.

 

@UNQKVSA - Append to the value of an existing key/value pair. The syntax is:

 

@UNQKVSA[[u,]filename, "key", "value"]

 

uOptional flag that the key and value are Unicode (UTF16)
filenameDatabase opened by @UNQOPEN
keyKey to update
valueValue to append to the existing value

 

Returns 0 if successful, or the error text if not.

 

@UNQOPEN - Open a UnQLite database, specifying a database name that is used by other @UNQ... functions. The syntax is:

 

@UNQOPEN[mode, filename]

 

The possible values for mode are:

 

RWCOpen a database with read+write privileges.  The database is created if it doesn't exist.

 

RWOpen the database with read+write privileges. If the database does not exist, an error is returned.

 

ROOpen the database in read-only mode. If the database does not exist, an error is returned.

 

MMA read-only memory-mapped view of the database.

 

If filename is ":mem:", then a private in-memory database is created. The in-memory database will be discarded when the database is closed.

 

Returns 0 if successful, or an error if not.

 

@UNQREADB - Read a binary value from an existing key in a UnQLite database. The syntax is:

 

@UNQREADB[[u,]filename, "key", handle, length]

 

uOptional flag that the key is Unicode (UTF16)
filenameDatabase opened by @UNQOPEN
keyKey to read
handleA binary handle returned by @BALLOC

 

Returns 0 if successful, or an error if not.

 

@UNQREADF - Read a value from an existing key in a UnQLite database and save it to a file. The syntax is:

 

@UNQREADF[[u,]filename, "key", outputname, length]

 

uOptional flag that the key is Unicode (UTF16)
filenameDatabase opened by @UNQOPEN
keyKey to read
outputnameOutput file that will contain the value

 

Returns 0 if successful, or an error if not.

 

@UNQREADS - Read a string value from an existing key in a UnQLite database. The syntax is:

 

@UNQREADS[[u,]filename, "key"]

 

uOptional flag that the key is Unicode (UTF16)
filenameDatabase opened by @UNQOPEN
keyKey to read

 

Returns the value as a string, or the error text.

 

 

Updated Commands:

 

DEDUPE

 

/H - Convert duplicate files to hard links to the first file.

 

DIRHISTORY

 

/M - number the lines when displaying the directory history list.

 

DIRS

 

/M - number the lines when display the DIRS list.

 

/P - pause after displaying each page.

 

DO

 

ISLIBRARY - returns 1 if the name is a library function

 

ISSYMLINK - returns 1 if the filename is a symlink.

 

ISREADABLE - returns 1 if the file is readable.

 

ISWRITEABLE - returns 1 if the file is writeable.

 

ESET

 

 /B - edit batch variables (1 - n).

 

FFIND

 

 /Q(uiet) - don't display any output, but set the FFIND internal variables.

 

FFIND now supports @filelists.

 

HISTORY

 

/M - number the lines when displaying the history list.

 

IF / IFF

 

ISLIBRARY - returns 1 if the name is a library function

 

ISSYMLINK - returns 1 if the filename is a symlink.

 

ISREADABLE - returns 1 if the file is readable.

 

ISWRITEABLE - returns 1 if the file is writeable.

 

JABBER

 

/IPv6 - use IPv6 instead of IPv4.

 

MKLINK

 

If you don't specify a target or any options, MKLINK will display information on the link (including OpenAFS reparse points).

 

ON ERROR

 

Now sets _SYSERR.

 

PDIR

 

/(K) - Display the CKSUM hash.

 

REGDIR

 

/T will now display the time for the top level key in addition to the subkeys.

 

REXEC

 

/IPv6 - use IPv6 instead of IPv4.

 

RSHELL

 

/IPv6 - use IPv6 instead of IPv4.

 

SCRPUT

 

/C - Move the cursor to the specified position after writing the string.

 

/U - Move the cursor to the end of the string.

 

SENDHTML

 

/IPv6 - use IPv6 instead of IPv4.

 

SENDMAIL

 

/IPv6 - use IPv6 instead of IPv4.

 

SET

 

/B - change batch variables (1 - n).

 

SETARRAY

 

/Z - resize an existing array. For example:

 

setarray myarray[5,2]

...

setarray /z myarray[8,3]

 

SMPP

 

/IPv6 - use IPv6 instead of IPv4.

 

SNPP

 

/IPv6 - use IPv6 instead of IPv4.

 

SWITCH

 

Now supports regular expressions for the CASE argument(s).

 

TASKDIALOG

 

/AF"details" - Like /A, but TASKDIALOG will show the details at the bottom of the dialog's footer area instead of immediately after the contents.

 

/AX"details" - Like /A, but TASKDIALOG will show the expanded details by default.

 

/DB:xx - Default button. This can either be a number (1000-n for custom buttons, or a defined button type:

 

OK

Yes

No

Cancel

Retry

Close

 

/DR:n - The default radio button (only valid when used with /R).

 

/T:n - Timeout after n seconds. Returns the Cancel / Close button value (12).

 

TYPE

 

/L0 - Don't number blank lines.

 

UNALIAS

 

Now supports regular expressions for the alias name.

 

UNFUNCTION

 

Now supports regular expressions for the function name.

 

UNSET

 

Now supports regular expressions for the variable name.

 

VSCRPUT

 

/C - Move the cursor to the specified position after writing the string.

 

/U - Move the cursor to the end of the string.

 

WEBFORM

 

/IPv6 - use IPv6 instead of IPv4.

 

WEBUPLOAD

 

/IPv6 - use IPv6 instead of IPv4.

 

WHICH

 

Now supports regular expressions for alias names.

 

 

New Commands:

 

MONITOR

 

Display or change monitor capabilities, including:

 

Technology type

Color temperature

Contrast

Display area position

Display area size

RGB drive

RGB gain

Brightness

Reset factory color defaults

Reset factory defaults

Save to nonvolatile storage

 

Not all settings are supported by all monitors. If you don't enter any arguments, MONITOR will display the current configuration of all physical monitors. Depending on the options and the monitor hardware, MONITOR can take several hundred milliseconds to return. The MONITOR command will fail if the monitor does not support DDC/CI.

 

The options are:

 

/N:n - change settings on physical monitor n. The default is 0.

 

/FD - restores the factory default settings

 

/FC - restores the factory default color settings

 

/B:n - set the brightness

 

/C:n - set the contrast

 

/T:n - change the color temperature. n can be one of the following:

 

4000

5000

6500

7500

8200

9300

10000

11500

 

/D:Color:n - Sets a monitor's red, green, or blue drive value. Drive settings are used to adjust the monitor's white point (drive is also called black level). Color is either RED, GREEN, or BLUE; n is the drive value (usually 0-100). You can have multiple /Drive arguments in a single MONITOR command.

 

/G:Color:n - Sets a monitor's red, green, or blue gain value. Gain settings are generally used to adjust the monitor's white point. Color is either RED, GREEN, or BLUE; n is the gain value (usually 0-100). Changing the gain settings can change the color temperature.  You can have multiple /Gain arguments in a single MONITOR command.

 

/AP:x:y - Set the horizontal (x=0) or vertical (x=1) position of the monitor's display area. y is the new width or height. Increasing the horizontal position moves the display area to the right; decreasing it moves the display area to the left. Increasing the vertical position moves the display area up, decreasing it moves the display area down.

 

/AS:x:y - Set the display area width (x=0) or height (x=1). y is the new width or height.

 

/S - save settings to the display's nonvolatile storage

 

MOUNTVHD

 

 Mount a VHD or VHDX image. You must be running an elevated session. The format is:

 

MOUNTVHD [d:\ | d:\path] image

 

d:Optional drive letter
d:\pathOptional mount path
imageVHD or VHDX file to mount

 

RECORDER

 

Record and play back mouse & keyboard input. The syntax is:

 

RECORDER [/C /K /L:n /M /P /R filename /S /W filename]

 

/CClear the macro queue

 

/KKeyboard events only (ignore mouse events)

 

/L:nPlay back the current macro n times

 

/MStart recording a macro

 

/PPlay back the current macro

 

/R nameLoad a macro file (previously saved with /S)

 

/S nameSave the current macro recording to a file

 

/WWait for the macro playback to finish

 

/XStop recording or playing

 

UNMOUNTVHD

 

Unmount a VHD or VHDX image previously mounted with MOUNTVHD. You must be running an elevated session. The format is:

 
UNMOUNTVHD [d:\ | d:\path\]

 

d:\Optional drive letter.
d:\path\Optional mount path

 

UNQLITE

 

UnQLite is an embedded NoSQL (Key/Value store and Document-store) database engine. UnQLite reads and writes directly to ordinary disk files. The complete database with multiple collections is contained in a single disk file.

 

The syntax is:

 

unqlite [/RWC [/RO [/MM] /RW /TEMP /MM] filename] [/DB:"database"] [/C filename] [/D key] [/R key] [/KVS "key" "value"] [/KVSA "key" "string"] [/KVB "key" handle length] [/KVBA "key" handle length] [/KVF "key" filename length] [/KVFA "key" filename length]

 

/CClose a database. If you omit the name, UNQLITE will close the most recently opened database.

 

/RWCOpen a database with read+write privileges.  The database is created if it doesn't exist.

 

/RWOpen the database with read+write privileges. If the database does not exist, an error is returned.

 

/ROOpen the database in read-only mode. If the database does not exist, an error is returned.

 

/TEMPA private, temporary on-disk database will be created. The database will be deleted when the database is closed.

 

/MMA read-only memory-mapped view of the database. Only valid when used with /RO.

 

filenameThe name of the database file. If filename is ":mem:", then a private in-memory database is created. The in-memory database will be discarded when the database is closed.

 

/DB:nameOpen an existing database for a read / write / delete operation. The database name should be quoted.

 

/DDelete the specified key

 

/RRead the specified key and display the string (or file) value.

 

/KVSCreate a key / value pair. If the key exists, it will be overwritten with the new value.

 

/KVSAAppend a string to the value of an existing key.

 

/KVFCreate a key / file value pair. If the key exists, it will be overwritten with the new value. length is the length of the file to write (or -1 for the entire file).

 

/KVFAAppend a file to the value of an existing key. length is the length of the file to write (or -1 for the entire file).

 

/KVBCreate a key / binary blob value. If the key exists, it will be overwritten with the new value. handle is a handle returned by @BALLOC; length is the length to write (or -1 for the entire buffer).

 

/KVBAAppend a binary blob to the value of an existing key. handle is a handle returned by @BALLOC; length is the length to write (or -1 for the entire buffer).