Quote:
Originally Posted by FooFightah
Wie oft denn noch D:
Ich versteh msdn nicht....
Und vor allem steht da nur wenig drinne,
zb stand bei SendMessage nur, dass man UINT Msg,
irgendwas anderes, WPARAM wParam und lParam braucht.
Aber, dass ich da noch
PHP Code:
void sendKeystroke(char character)
{
WPARAM keystroke = LOBYTE(VkKeyScanA(character));
}
und
PHP Code:
sendKeystroke('w');
brauch, hab ich erst nach 2 Tagen Flame und halben Nervenzusammenbrüchen
erfahren. Von daher find ich msdn in der Beziehung Crap.
So und jetzt wieß ich, dass ich für SendInput
UINT nInputs, LPINPUT pInputs und int cbSize brauch.
Aber woher bekomme ich diese Parameter und was fehlt mir noch
wenn ich die Parameter hab, um endlich die Scheiße zum Laufen zu kriegen?
|
Da sieht man, dass du 0 verstanden hast <.<
Die MSDN ist alles andere als Crap, wenn der User halbwegs Intelligenz+Grundlagen +
Eigeninitiative hat
1. das brauchst du auch nicht, das ist eine Möglichkeit SendMessage zu nutzen
SendMessage hat viele Funktionen und die können da nicht alle aufgelistet werden
2. die msdn ist sehr umfangreich
3. hättest du dir ja mal das Beispiel ansehen können oder auf andere links klicken können (es gibt immer links wie "See also" oder manchmal sind sogar die Parametertypen selbst verlinkt! also einfach mal augen+hirn nutzen ;))
4. gibts google
5. die parameter bekommst du nirgendwoher <.< die gibst doch DU der funktion. da stehen beschreibungen der Parameter, lies, wozu sie gut sind, denke nach und probiere aus.
Zusätzlich wie gesagt google oder die Beispiele
6. verdammt noch mal, lern doch erst mal
-die Grundlagen
-wie man mit suchmaschinen und der msdn umgeht
-wie man in der msdn das findet, was man sucht
Ansonsten sehe ich schwarz für eine C&P freie Codingzukunft :rolleyes:
edit: Hab mir das mal angesehen.
Wenn du der Englischen Sprache mächtig bist und nicht zu faul, dich durch 2-3 Links zu klicken, erfährst du ganz leicht, wie es geht.
Code:
UINT SendInput(
UINT nInputs,
LPINPUT pInputs,
int cbSize
);
Quote:
Parameters
nInputs
[in] Number of structures in the pInputs array.
pInputs
[in] Pointer to an array of INPUT structures. Each structure represents an event to be inserted into the keyboard or mouse input stream.
cbSize
[in] Specifies the size, in bytes, of an INPUT structure. If cbSize is not the size of an INPUT structure, the function fails.
|
Code:
typedef struct tagINPUT {
DWORD type;
union {MOUSEINPUT mi;
KEYBDINPUT ki;
HARDWAREINPUT hi;
};
}INPUT, *PINPUT;
Quote:
Members
type
Specifies the type of the input event. This member can be one of the following values.
INPUT_MOUSE
The event is a mouse event. Use the mi structure of the union.
INPUT_KEYBOARD
The event is a keyboard event. Use the ki structure of the union.
INPUT_HARDWARE
Windows 95/98/Me: The event is from input hardware other than a keyboard or mouse. Use the hi structure of the union.
mi
A MOUSEINPUT structure that contains information about a simulated mouse event.
ki
A KEYBDINPUT structure that contains information about a simulated keyboard event.
hi
Windows 95/98/Me: A HARDWAREINPUT structure that contains information about a simulated event from input hardware other than a keyboard or mouse.
|
Code:
typedef struct tagKEYBDINPUT {
WORD wVk;
WORD wScan;
DWORD dwFlags;
DWORD time;
ULONG_PTR dwExtraInfo;
} KEYBDINPUT, *PKEYBDINPUT;
Quote:
Members
wVk
Specifies a virtual-key code. The code must be a value in the range 1 to 254. The Winuser.h header file provides macro definitions (VK_*) for each value. If the dwFlags member specifies KEYEVENTF_UNICODE, wVk must be 0.
wScan
Specifies a hardware scan code for the key. If dwFlags specifies KEYEVENTF_UNICODE, wScan specifies a Unicode character which is to be sent to the foreground application.
dwFlags
Specifies various aspects of a keystroke. This member can be certain combinations of the following values.
KEYEVENTF_EXTENDEDKEY
If specified, the scan code was preceded by a prefix byte that has the value 0xE0 (224).
KEYEVENTF_KEYUP
If specified, the key is being released. If not specified, the key is being pressed.
KEYEVENTF_SCANCODE
If specified, wScan identifies the key and wVk is ignored.
KEYEVENTF_UNICODE
Windows 2000/XP: If specified, the system synthesizes a VK_PACKET keystroke. The wVk parameter must be zero. This flag can only be combined with the KEYEVENTF_KEYUP flag. For more information, see the Remarks section.
time
Time stamp for the event, in milliseconds. If this parameter is zero, the system will provide its own time stamp.
dwExtraInfo
Specifies an additional value associated with the keystroke. Use the GetMessageExtraInfo function to obtain this information.
|