Autor Beitrag
Halber
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55



BeitragVerfasst: Mo 16.01.06 16:53 
hallo zusammen

ich würd gern wissn, wie man die mausposition systemweit beinflussen kann. und bitte nich gleich steinigen, hab jetz ne halbe stunde gesucht uns is nix bei rausgekommn

danke für eure hilfe
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Mo 16.01.06 17:00 
Im Easy Helper gibts sehr schöne Sachen. U.a. diese hier:

Zitat:

Mausbewegungen simulieren
GetCursorPos, Sleep, SetCursorPos


--------------------------------------------------------------------------------

Folgende Prozedur bewegt die Maus von der aktuellen Position zu den Koordinaten, die der Prozedur als Parameter übergeben werden. Der dritte Parameter gibt die Zeit in Millisekunden an, die zwischen jeder Bewegung gewartet werden soll.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
procedure MoveMouse(X, Y: Integer; Speed: Cardinal=1);
var
  PosX, PosY : integer;
  mPos : TPoint;
begin
  PosX := X;
  PosY := Y;

 Repeat
   sleep(speed);
   Application.Processmessages;
   GetCursorPos(mPos);
   with mPos do
   begin
     If x > PosX then
       dec(x)
     else
     If x < PosX then
       inc(x);
     If y > PosY then
       dec(y)
     else
     If y < PosY then
       inc(y);
     SetCursorPos(x,y);
   end;
  until (mPos.X=PosX) and (mPos.Y=PosY);
end;




Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot