Scrolly plugin for Take Command / TCC / TCC/LE

beta version 0.99.11     2020-09-09

Charles Dye

Purpose:

This plugin adds hotkeys to scroll backward and forward through the console window by commands.

Installation:

To install this plugin, copy Scrolly.dll to a subdirectory named PlugIns within your Take Command program directory. (If you are using the 32-bit version of Take Command, copy Scrolly-x86.dll instead of Scrolly.dll.) It will be loaded automatically when TCC starts.

Plugin Features:

New hotkeys: CtrlAltUp, CtrlAltDown

New command: SCROLLY

Syntax Note:

The syntax definitions in the following text use these conventions for clarity:

BOLD CODEindicates text which must be typed exactly as shown.
CODEindicates optional text, which may be typed as shown or omitted.
Bold italicnames a required argument; a value must be supplied.
Regular italicnames an optional argument.
ellipsis…after an argument means that more than one may be given.

New Hotkeys:

CtrlAltUp — Scroll backward (up) by commands.

CtrlAltDown — Scroll forward (down) by commands.


Only commands that were entered after this plugin was loaded are recognized.

You can use the SCROLLY command to set different keys.



New Command:

SCROLLY — Display and change plugin settings.

Syntax:
SCROLLY /B:key /D /E:yn /F:key /L /R /S /W:yn

/B:keyset the back (up) hotkeyCtrl-Alt-Up
/Drestore the built-in plugin defaults 
/E:ynenable or disable the error soundYes
/F:keyset the forward (down) hotkeyCtrl-Alt-Down
/Llist all supported hotkeys 
/Rrestore saved settings from the registry 
/Ssave current settings to the registry 
/W:ynenable or disable wrapYes

You can specify different hotkeys with /B: and /F:. To see a list of all supported hotkeys, use /L. (The list can vary between different versions of TCC, because the plugin hotkey interface changed in version 24.) Note that some key combinations may not be seen by the plugin — they might be used by the console, or by Take Command. If your hotkey doesn’t work, try changing it back to its original value, Ctrl-Alt-Up or Ctrl-Alt-Down.


The default behavior when scrolling above the first command in the buffer, or below the last one, is to wrap around from top to bottom or vice versa. You can disable this wrapping feature with /W:N. Use /W:Y to re-enable it.


By default, Scrolly plays a sound (the system ‘Default Beep’ sound) if any error occurs. The most likely errors are trying to scroll above the first command in the console buffer, or below the last one, while wrap is disabled. You can disable the error sound with /E:N; use /E:Y to re-enable it.


/D restores the original plugin default settings. /R restores the settings saved to the registry, if any. You cannot combine the two.

/S saves the current settings to the registry. They will be loaded automatically the next time you load this plugin.



How It Works:

Every time you press Enter, Scrolly marks the start of the current command line in the screen buffer. You can’t see the mark, but it’s there.

Later, when you press CtrlAltUp or CtrlAltDown, the plugin searches the screen buffer for marked lines, and scrolls the screen up or down to the next mark.

This is why only commands entered after the plugin was loaded are recognized: they are the only ones marked. For this reason, it doesn’t make sense to load and unload the plugin. Just put it in your PlugIns directory so it loads automatically at startup, and let it do its thing.


Scrolly will not load in transient or pipe shells. This is by design; Scrolly is only useful in interactive shells. Elsewhere, it would only waste memory.



Startup Message:

This plugin displays an informational line when it initializes. The message will be suppressed in transient or pipe shells. You can disable it for all shells by defining an environment variable named NOLOADMSG, for example:

set /e /u noloadmsg=1

Status and Licensing:

Consider this beta software. It may well have issues. Try it at your own risk. If you find a problem, you can report it in the JP Software support forum.

Scrolly is currently licensed only for testing purposes. I may make binaries and source code available under some free license once I consider it ready for use.

Download:

You can download the current version of the plugin from http://prospero.unm.edu/dl/scrolly.zip or ftp://prospero.unm.edu/scrolly.zip.