Autor Beitrag
Dookie
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Di 11.02.03 02:52 
Wie kann ich eine Tastaturknopfdruck simulieren?
Ich suche eine äquivalente Lösung zur Simulation eines Mausklicks mittels
ausblenden Quelltext
1:
mouse_event(MOUSEEVENTF_leftDOWN,x,y,0,0);					


Das ganze soll auf jeden Fall auch global funktionieren!!

_________________
There are 10 kind of people => Those who understand binary, and those who don't!! =;o)
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: Di 11.02.03 08:07 
Versuche es mal mit: keybd_event

_________________
Ist Zeit wirklich Geld?
Dookie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Di 11.02.03 23:20 
Wenn mir nun auch noch jemand sagen kann, wie man das benutzt?!
Ich bekomme das voll nicht hin irgendwie...

virtual-key code,
hardware scan code,
was will er da von mir?? :(

_________________
There are 10 kind of people => Those who understand binary, and those who don't!! =;o)
Dookie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Di 11.02.03 23:23 
ich meine, die virtuellen keycodes sagen mir jetzt schon was, aber ich will eigentlich nur ein paar tastendrucks simuliert haben, und sonst nix... :roll:

_________________
There are 10 kind of people => Those who understand binary, and those who don't!! =;o)
Dookie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Mi 12.02.03 01:32 
ok, ich habs letztendlich doch noch hinbekommen...
vielen dank für den support nochmal!! :D

_________________
There are 10 kind of people => Those who understand binary, and those who don't!! =;o)
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mi 12.02.03 10:29 
Poste doch mal den Sourcecode damit andere auch etwas von Deiner Frage und letztendlich dann von der Lösung haben!

Gruß
TINO
Nomis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 72



BeitragVerfasst: Sa 15.02.03 16:50 
Titel: wäre Nett
Das wäre echt nett, da ich das selbe vorhab
Dookie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Sa 15.02.03 22:37 
Also für die Virtual-Keycodes sollte man sich einfach ne Tabelle irgendwo her besorgen!
Ich brauchte nur Zahlen für mein Proggy, und hab durch Probieren rausgefunden, dass man einfach nur zu seiner Zahl 48 hinzuaddieren muss, um den entsprechenden VK-Code zu erhalten!

Die anderen Sachen lässt man einfach auf 0.

Die ganzen Verständnisprobleme waren bei mir nur entstanden, weil ich nen Bug drin hatte,... :?

Ich poste einfach mal Codefetzen meines Progs:

Hier wird der Mauscursor an eine bestimmte Position gesetzt und ein Linksklick simuliert:
ausblenden Quelltext
1:
2:
3:
SetCursorPos(x,y);
mouse_event(MOUSEEVENTF_LEFTDOWN,Mouse.CursorPos.x,Mouse.CursorPos.y,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,Mouse.CursorPos.x,Mouse.CursorPos.y,0,0);


Und hiermit wird ein Tastendruck auf die "0" simuliert:
ausblenden Quelltext
1:
keybd_event(48,0,0,0);					


Hoffe euch ist damit geholfen... 8)

_________________
There are 10 kind of people => Those who understand binary, and those who don't!! =;o)
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 15.02.03 23:03 
Willst du damit Text in ein Edit schreiben? Dir ist klar, dass das nur geht, wenn sich das Fenster immer an der gleichen Stelle befindet. :roll:

Wie man Text in das Edit einer fremden Anwendung schreibt, hab eich hier schon öfters gepsotet.
Dookie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Sa 15.02.03 23:59 
Nein, das möchte ich nicht, das wäre wesentlich einfacher gewesen! ;)

Ich habe ein Freewaretool namens Klicker für Onlinegame-Spieler (insbesondere für www.droidwars.de) geschrieben!

Wer's sehn möchte, sollte diesem Link folgen!!

Darf natürlich frei kopiert werden, ich bin ja nicht Microsoft *lol*...

_________________
There are 10 kind of people => Those who understand binary, and those who don't!! =;o)