Autor Beitrag
Kidix
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 08.01.05 13:15 
Hi,


ich habe heute schon ein wenig gesucht, aber durch die Suchfunktion nicht wirklich viel gefunden.
Aber vielleicht kann mir jemand von euch weiterhelfen.

Ich würde gerne die Mausklicks (global) zählen lassen. Gibt es da ne möglichkeit?


Gruß

Kidix
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Sa 08.01.05 13:40 

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
Kidix
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 08.01.05 13:48 
hi,

ich hab mir das schon angeschaut, aber keines der ergebnisse war fehlerfrei...
vielleicht hat sich ja doch noch ein schnippsel code hier verlaufen der mir helfen könnte...

gruß

Kidix
IngoD7
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 629


D7
BeitragVerfasst: Sa 08.01.05 13:57 
Kidix hat folgendes geschrieben:

ich hab mir das schon angeschaut, aber keines der ergebnisse war fehlerfrei...
Dann hast du's also eingebaut? Zeig doch mal. Ist doch viel schöner, das was du schon hast, zu reparieren, als irgendwas neues versuchen abzuschreiben. :twisted: :wink:
Kidix
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 08.01.05 14:03 
ausblenden volle Höhe 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:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
library mousehook;

uses
  Windows,
  Messages;

const
  WM_HOOKMAP = WM_USER + $0400;

var
  HookHandle    : HHook;
  FileMapObj    : THandle;
  FileMapView   : ^Integer;

function MouseHookProc(Code: Integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
begin
  if code = HC_ACTION then
  begin
    FileMapObj := OpenFileMapping(FILE_MAP_READ, False,'MouseHookMapFile');
    if FileMapObj <> 0 then
    begin
      FileMapView := MapViewOfFile(FileMapObj, FILE_MAP_READ, 0, 0, 0);
      PostMessage(FileMapView^, WM_HOOKMAP, wParam, lParam);
      UnmapViewOfFile(FileMapView);
      CloseHandle(FileMapObj);
    end;
  end;
 
  //Result := CallNextHookEx(HookHandle, Code, wParam, lParam);
end;

procedure InstallMouseHook; stdcall;
begin
  HookHandle := SetWindowsHookEx(WH_MOUSE, @MouseHookProc, hInstance , 0);
end;

procedure UninstallMouseHook; stdcall;
begin
  UnhookWindowsHookEx(HookHandle);
end;

exports
InstallMouseHook,
UninstallMouseHook;

begin
end.
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Sa 08.01.05 14:10 
Hi,

Hab mal ein kleines Beispiel Projekt geamcht ohne Dll und ohne Timer aber mit einem Hook:
rapidshare.de/files-.../Countclick.zip.html
Kidix
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 08.01.05 14:14 
danke toms, genau das habe ich gesucht :-)