Einzelnen Beitrag anzeigen

lordludwig

Registriert seit: 16. Mai 2006
Ort: Gröbenzell
40 Beiträge
 
Delphi 2005 Personal
 
#23

Re: Package erstellen und installieren...

  Alt 19. Mai 2006, 22:46
ich denke schon, so geht es zumindest weiter...

Delphi-Quellcode:
unit sndkey32;

interface

Uses SysUtils, Windows, Messages, Classes;

Function SendKeys(SendKeysString : PChar; Wait : Boolean) : Boolean;
function AppActivate(WindowName : PChar) : boolean;
//procedure Register;
{Buffer for working with PChar's}

const
  WorkBufLen = 40;
var
  WorkBuf : array[0..WorkBufLen] of Char;

implementation
type
  THKeys = array[0..pred(MaxLongInt)] of byte;
var
  AllocationSize : integer;

(*
Converts a string of characters and key names to keyboard events and
passes them to Windows.

Example syntax:

SendKeys('abc123{left}{left}{left}def{end}456{left 6}ghi{end}789', True);

*)



procedure Register;
begin
    RegisterComponents('Samples', [ Sendkeys ]);
end;

Function SendKeys(SendKeysString : PChar; Wait : Boolean) : Boolean;
type
  WBytes = array[0..pred(SizeOf(Word))] of Byte;

  TSendKey = record
    Name : ShortString;
    VKey : Byte;
  end;
.
.
.
Ludwig Wagner
  Mit Zitat antworten Zitat