Autor Beitrag
ex4ct
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 67


Delphi 7
BeitragVerfasst: Mo 08.05.06 12:35 
Wie kann ich es machen dass ich in ein Timer mehrere Mausklicks simulieren kann?
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TForm1.Timer1Timer(Sender: TObject);
var x,y,i,u:integer;
begin
for i:= 1 to 50 do begin
  u:=u+10;
  x:=100;
  y:=400+u;
  setcursorpos(x,y);
  mouse_event(MOUSEEVENTF_leftDOWN,x,y,0,0);
  mouse_event(MOUSEEVENTF_leftUP,x,y,0,0);
  end;
end;

So gehts leider nicht, es wir nur eine Stelle angeklickt!
Danke für eure Antworten.
MFG!
azubi_20
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 593

WinXP SP2, Ubuntu 8.4
D7 Enterp., D2005 Prof., Java (Eclipse 3.4.0)
BeitragVerfasst: Mo 08.05.06 12:39 
möchtest du wirklich 50 mal pro Timer-Ereignis den Klick simulieren oder 1 mal pro timerereignis (was ja bestimmt mehrmals stattfindet) ?
Peter Wolf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37

WinXP Pro
Delphi7 Ent.
BeitragVerfasst: Mo 08.05.06 12:42 
Hallo,

ich würde mal ein sleep dazwischen setzen. So schnell wie Du die Maus klicken lässt kann das Windows gar nicht verarbeiten.

Grüße Peter