Skip to content

The simplified way to interact with the SendInput-API of windows with Delphi

Notifications You must be signed in to change notification settings

WladiD/SendInputHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

SendInputHelper

SendInputHelper is a unit for Delphi, that contains a class for simple and safe usage for the SendInput-API of Windows. With it you can pass any chars, strings, "shift"-keys and shortcuts as regular keyboard strokes.

Example

uses
  ..., SendInputHelper;

procedure TForm1.Button1Click(Sender: TObject);
var
  SIH: TSendInputHelper;
begin
  SIH := TSendInputHelper.Create;
  try
    // Start command shell
    SIH.AddShortCut([ssWin], 'r'); // Win+R
    SIH.AddDelay(100);
    SIH.AddText('cmd', True); // Second parameter True means AppendReturn
    SIH.AddDelay(500);

    SIH.AddText('ping google.de', True); // Perform a ping.

    SIH.Flush; // Isn't it easy?
  finally
    SIH.Free;
  end;
end;

About

The simplified way to interact with the SendInput-API of windows with Delphi

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages