Einzelnen Beitrag anzeigen

Lapadula

Registriert seit: 6. Mär 2011
9 Beiträge
 
#15

AW: Mausklick simulieren

  Alt 7. Mär 2011, 17:02
Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  klcks: integer;

implementation

{$R *.dfm}



procedure TForm1.Button1Click(Sender: TObject);
var i :integer ;
begin
SetCursorPos(200,200);
For i := 0 to strtoint(edit1.text) do
 begin
 mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
 mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
 end;
  Mit Zitat antworten Zitat