A "Gauge" is a special type of a button that can show a graphical progress bar. It might seem strange to think of a graphical gauge as a button, but in TeSSH you can click on a gauge to execute a script, just like with a button. Gauges are displayed in the same button bars within the window that buttons are, allowing you to arrange the graphical status gauges next to other button controls.

A Gauge tracks the value of a variable (or expression) graphically. The Gauge has a main Value field which gives the expression to be computed. The MaxValue field is the expression which defines the maximum extent of the gauge.

The easiest way to create a gauge is via the Package Editor. Create a button, then set the Button Type to the "Gauge" value. A new "Gauge" tab will appear along the bottom of the editor window to allow you to edit the various gauge properties. See the Editing Gauges topic for details on the editor screen fields.

To create a gauge from the command line, use the #GAUGE command. For example, to create a gauge to display your hitpoints, you can use this:

#GAUGE ping "" @ping @maxping

The first two arguments give the ID (shortcut name) and Caption values for the gauge. The @ping argument is the expression to evaluate to determine the main Value of the gauge, and the @maxping argument is the expression used to determine the maximum value of the gauge.

See the #GAUGE command topic for details on specifying colors and other arguments via the command line.

The Caption field is expanded for variables and functions when the gauge is displayed. In the example show at the top of this screen, the caption was set to: @ping/@maxping which then ends up displaying the caption of "300/400" when ping=300 and maxping=400. The Text color of the caption is changed on the normal Button Options editor screen.

Add comment

Login or register to post comments