Total Commander Command Poster

Version 0.3

Posts command(s) to TC window by number or name defined in Totalcmd.inc using
functions PostMessage()/SendMessage Win32 API with WM_USER+51 and wParam=cmd.

May be useful in make- or batch file for example to send command
cm_UnloadPlugins before linking TC plugin.

Usage:

    tccp <cmd> [<cmd>...] [-i<tc_inc>] [-s] [-t<class_name>]

<cmd> - numeric code (dec) or name of command, e.g. 493 or cm_ConfigSavePos to
        save window position of Total Commander.

   -a - send commands to all found TC windows (default: first found window).

   -f - bring TC window to foreground before sending command.

   -i - parse command code from file <tc_inc>, e.g. -ic:\wincmd\Totalcmd.inc
        default: Totalcmd.inc in working directory.

   -s - use SendMessage() function instead of PostMessage(). In case of dialog
        box tccp will not receive control until TC closed this dialog.

   -t - main window class of TC; in version 6.03-10.52 and default
        is 'TTOTAL_CMD'.

   -? - help

ERRORLEVEL: 0 - success or TC not started, non zero - some (may be unknown) error.
See stdout.

NB: Switches and command names are NOT case sensitive. Order - arbitrary.

Tested with Total Commander 6.53, 10.52.

2005/06/26 - Nov 2022

Hobo, hobo-mts@mail.ru
