Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Tastatur Hook (https://www.delphipraxis.net/153135-tastatur-hook.html)

1234567890987654321 22. Jul 2010 11:45

Tastatur Hook
 
Hallo,
ich würde gerne alles was man auf der Tastatur macht in ein Memo speichern.
Bei dem Code der auf dieser Seite ist:
http://www.delphipraxis.net/30504-ma...rrecorder.html, kommt wider der Fehler mit dem @
hHook := SetWindowsHookEx(WH_KEYBOARD, @KeyboardProc, hInstance, 0);

gibt es sonst noch eine Möglichkeit?

idefix2 22. Jul 2010 13:13

AW: Tastatur Hook
 
Ich fürchte, wenn Du nicht etwas ausführlicher erläuterst, was Du machst und wo Dein Problem ist, wird Dir hier (und auch sonstwo) niemand helfen können.

1234567890987654321 22. Jul 2010 17:51

AW: Tastatur Hook
 
Also ich will das wenn ich in Open Office einen Text eingebe, z.B.
"Hallo wie gehts? BlaBlaBla"
das in meinem Memo
"Hallo wie gehts? BlaBlaBla" steht.

mkinzler 22. Jul 2010 17:56

AW: Tastatur Hook
 
Dann verwende Automatisierung

1234567890987654321 22. Jul 2010 17:58

AW: Tastatur Hook
 
Was ist das?
Hättejemnd vllt. ein kleines Code-Beispiel

himitsu 22. Jul 2010 18:35

AW: Tastatur Hook
 
OpenOffice hat bestimmt auch ein PlugIn-System, wo man etwas reinbauen/installieren kann, welches einem denn gewisse Ereignisse zukommen läßt.

- fast alles von MS Office hat auch sowas, womit man z.B. Outlook erweitern und/oder steuern kann
- und auch die Delphi-IDE läßt sich über die OpenToolsAPI erweitern/steuern.

offizielle Schnittstellen sind immer besser, als irgendwelche "Hacks".

Luckie 22. Jul 2010 19:02

AW: Tastatur Hook
 
Idefix meinte wohl eher, welcher Code und welches Problem mit dem @-Zeichen.

1234567890987654321 22. Jul 2010 19:57

AW: Tastatur Hook
 
Ne, es soll auch in Firefox+Notepad+IE usw. funktionieren.
Und der Fehler ist in der Zeile
hHook := SetWindowsHookEx(WH_KEYBOARD, @KeyboardProc, hInstance, 0);
und heisst:
project1.lpr(54,55) Error: Incompatible type for arg no. 2: Got "<address of function(LongInt, LongWord, LongWord):DWord;StdCall>", expected "<procedure variable type of function(LongInt, LongInt, LongInt):LongInt;StdCall>"

Wenn ich das @ weglasse, kommt in der gleichen Zeile der Fehler:
project1.lpr(54,42) Error: Wrong number of parameters specified for call to "KeyboardProc"

könnte villeicht jemand von euch die Dll kompilieren und sie hochlade(das währe sehr sehr (for i:=1 to 1000000 do s:=s+'sehr) nett)
oder hatt vllt. jemand eine andere Möglichkeit?

1234567890987654321 22. Jul 2010 20:02

AW: Tastatur Hook
 
Hab noch das gefunden, aber da ist wieder das @...
http://delphi.about.com/od/windowssh...board_hook.htm
Die version mit der Unit währ mir liber

1234567890987654321 22. Jul 2010 20:09

AW: Tastatur Hook
 
hab eine demo gefunden:
http://www.swissdelphicenter.ch/de/showcode.php?id=1722


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:55 Uhr.
Seite 1 von 2  1 2      

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz