Touch-It Virtual Keyboard Version 4.9.2
Automation
Interface

var

Warnings :array[2201..2205] of boolean;//Array used for flashing warnings
FlipFlop :boolean;//Flashing flip-flop


implementation

//************************************************************************************
//The vumeter is driven by the TrackBar1. All lights under a certain value must be ON.
//TrackBar1 Min and Max properties are set to 2000 and 2019.

procedure TForm1.TrackBar1Change(Sender: TObject);
begin

TIServer.LightRange(TrackBar1.Position, TrackBar1.Min, TrackBar1.Max);

end;

//************************************************************************************
//The post-process is driven by the TrackBar2. Only one light is ON at a time.
//TrackBar2 Min and Max properties are set to 2100 and 2119.

procedure TForm1.TrackBar1Change(Sender: TObject);
begin

TIServer.LightOne(TrackBar2.Position, TrackBar2.Min, TrackBar2.Max);

end;

//************************************************************************************
//Warnings lights are driven by the CheckBoxes. Flashing is managed in the Timer OnTimer event.

//Change warning states when CheckBoxes are clicked. The Tag property contains the light code.

procedure TForm1.cbPressureClick(Sender: TObject);
begin
with TCheckBox(Sender) do

Warnings[Tag] := Checked;

end;

//Switch ON or OFF
procedure TForm1.Timer1OnTimer(Sender: TObject);
var

i :integer; //Loop count

begin

for i := low(Warnings) to high(Warnings) do

TIServer.Light(i, Warnings[i] and FlipFlop);


FlipFlop := not FlipFlop;

end;

When starting, Touch-It broadcasts a WM_TOUCHITSTART message which allows you to initialize the lights state. See Windows messages to learn how to trap this message.
Copyright © 2011 Chessware SA