-left to right
procedure TForm1.Button1Click(Sender: TObject);
begin
Timer1.Interval:=500;
Timer1.enabled:=true;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Timer1.enabled:=false;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
keys : TKeyboardState;
begin
GetKeyboardState( keys );
keys[VK_NUMLOCK] := 1;
SetKeyboardState( keys );
sleep(50);
GetKeyboardState( keys );
keys[VK_NUMLOCK] := 0;
SetKeyboardState( keys );
sleep(50);
GetKeyboardState( keys );
keys[VK_CAPITAL] := 1;
SetKeyboardState( keys );
sleep(60);
GetKeyboardState( keys );
keys[VK_CAPITAL] := 0;
SetKeyboardState( keys );
sleep(60);
GetKeyboardState( keys );
keys[VK_SCROLL] := 1;
SetKeyboardState( keys );
sleep(50);
GetKeyboardState( keys );
keys[VK_SCROLL] := 0;
sleep(5);
SetKeyboardState( keys );
GetKeyboardState( keys );
end;
----------------------------------------------------------------------
-Right to left
procedure TForm1.Button1Click(Sender: TObject);
begin
Timer1.Interval:=500;
Timer1.enabled:=true;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Timer1.enabled:=false;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
keys : TKeyboardState;
begin
GetKeyboardState( keys );
keys[VK_SCROLL] := 1;
SetKeyboardState( keys );
sleep(5);
GetKeyboardState( keys );
keys[VK_SCROLL] := 0;
SetKeyboardState( keys );
sleep(50);
GetKeyboardState( keys );
keys[VK_CAPITAL] := 1;
SetKeyboardState( keys );
sleep(60);
GetKeyboardState( keys );
keys[VK_CAPITAL] := 0;
SetKeyboardState( keys );
sleep(60);
GetKeyboardState( keys );
keys[VK_NUMLOCK] := 1;
SetKeyboardState( keys );
sleep(50);
GetKeyboardState( keys );
keys[VK_NUMLOCK] := 0;
SetKeyboardState( keys );
sleep(50);
end;
-------------------------------------------------------------------------------------------------
night rider / left <>right
procedure TForm1.Button1Click(Sender: TObject);
begin
Timer1.Interval:=500;
Timer1.enabled:=true;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Timer1.enabled:=false;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
keys : TKeyboardState;
begin
GetKeyboardState( keys );
keys[VK_NUMLOCK] := 1;
SetKeyboardState( keys );
sleep(100);
GetKeyboardState( keys );
keys[VK_NUMLOCK] := 0;
SetKeyboardState( keys );
sleep(100);
GetKeyboardState( keys );
keys[VK_CAPITAL] := 1;
SetKeyboardState( keys );
sleep(120);
GetKeyboardState( keys );
keys[VK_CAPITAL] := 0;
SetKeyboardState( keys );
sleep(120);
GetKeyboardState( keys );
keys[VK_SCROLL] := 1;
SetKeyboardState( keys );
sleep(100);
GetKeyboardState( keys );
keys[VK_SCROLL] := 0;
sleep(100);
SetKeyboardState( keys );
GetKeyboardState( keys );
keys[VK_CAPITAL] := 1;
SetKeyboardState( keys );
sleep(120);
GetKeyboardState( keys );
keys[VK_CAPITAL] := 0;
SetKeyboardState( keys );
sleep(120);
GetKeyboardState( keys );
keys[VK_NUMLOCK] := 0;
SetKeyboardState( keys );
sleep(100);
GetKeyboardState( keys );
keys[VK_NUMLOCK] := 1;
SetKeyboardState( keys );
sleep(100);
end;