Autor Beitrag
Thunderwave
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Mo 27.03.06 20:31 
Ich möchte mit einem Programm die Maus steuern. Ich glaube die Position des Mauszeigers kann ich mit setcursorpos(x,y) bestimmen, aber wie bringe ich den Mauszeiger dazu, das er an dieser Stelle klickt? Und kann ich rechts- und linkskick unterscheiden?
reflex
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20

Win98,WinME,WinXP, Suse Linux 10.1
D7 Pers, D3 Prof
BeitragVerfasst: Di 28.03.06 17:22 
ausblenden Quelltext
1:
mouse_event(MOUSEEVENTF_LEFTDOWN, X, Y, 0, 0);					


das müsste meiner meinung nach nen Mausklick an der Stelle x/y bewirken... einfach durch zahlenwerte ersetzen.
Mit Rightdown müsste ein Rechtsklick funzen..

mfg
Fighter#1
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 787

Win XP, Ubuntu 8.04
Turbo Delphi 2006, Delphi 2005 Pe, Delphi 5 Pe, Netbeans 6.1, Eclipse, Microsoft VisualC#, Dev C++, PHP, HTML, CSS
BeitragVerfasst: Di 28.03.06 17:38 
achtung du musst die Maus für einen klick auch wieder 'hoch holen'

ausblenden Delphi-Quelltext
1:
mouse_event(MOUSEEVENTF_LEFTUP, X, Y, 0, 0);					

_________________
Wer andere beherrscht ist stark,
wer sich selbst beherrscht ist mächtig. Lao Tse
reflex
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20

Win98,WinME,WinXP, Suse Linux 10.1
D7 Pers, D3 Prof
BeitragVerfasst: Di 28.03.06 17:43 
stimmt, das hatte ich übersehn! sonst gibts hinterher Probleme! sry!
Thunderwave Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Di 28.03.06 19:27 
THX! gleich mal versuchen ^^
ub60
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 765
Erhaltene Danke: 130



BeitragVerfasst: Fr 31.03.06 22:45 
Ich weiß ja nicht, was Du programmieren willst, aber i.A. hilft schon das MouseDown-Ereignis der anzuklickenden Komponente.

ausblenden Delphi-Quelltext
1:
2:
procedure TForm1.ButtonMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);


Da steht dann alles drin, was Du brauchst.

ub60