I have seen the online game plug-in production (2)

zhaozj2021-02-16  60

I have made a general summary of the five types of plug-in. Everyone has a certain understanding of these plugs. Now it is shallow to talk about some of the knowledge of the external production ~~~ ~ First, let's talk about the plug-in plug-in, which is the easiest way to do when I first write. I still remember that I was still in the "Stone" era, I saw someone hanging a software (plug-in) person, I could go four outdoors (I didn't know how to hang it outside. ^), So I found this software. Over the study (after taking it, he listened to others said that this is a hanging). It is found that this stuff is actually not difficult, and it is not difficult to see that there is no way to go in different places. There is a impulse of this function, then I will take some information on MSDN, I find this kind of function, only a few simple API functions can be done: 1. First we have to know the location of the mouse (for It is better to restore the location of the mouse) so we will use the API function getCursorpos, which uses the following: Bool getCursorpos

LPPOINT LPPOINT / / Address Of Structure For Cursor Position; 2, we move the location of the mouse to the place where the characters are coming, we will use the SetCursorpos function to move the mouse position, its usage is as follows: Bool setCursorpos

INT x, // horizontal position int y // vertical position); 3, the analog mouse issues a press and release action, we want to use the mouse_event function to implement, with the use of the use: void mouse_event

DWORD dwFlags, // flags specifying various motion / click variants DWORD dx, // horizontal mouse position or position change DWORD dy, // vertical mouse position or position change DWORD dwData, // amount of wheel movement DWORD dwExtraInfo // 32 bits of Application-defined information; at its dwflags, available events are like mobile mouseeventf_move, the left mouseeventf_leftdown, the left mouseeventf_leftup, the specific stuff is still checked MSDN ~~~~~ Ok, there is Former knowledge, we can take a look at how the characters are removed:

GetCursorpos (Point); SetCursorpos (Ranpoint (80, Windowx), Ranpoint (80, Windowy)); // Ranpoint is a homemade random coordinate function mouse_event (MouseEventf_leftdown, 0, 0, 0, 0); mouse_event (MouseEventf_leftup, 0, 0,0,0); setCursorpos (Point.x, Point.y);

I saw the above code. Is it very simple to see the characters ~~, give a three, there is a lot of good Dongdong can use this skill (I have said, TMD, this is the practice of garbage , Believe it ~~~), then look at the way to attack the game in the game (required to attack the shortcut key), the truth is still the same, just use the API difference ~~~, this back we use to be keybd_event function, which is used as follows: VOID keybd_event (BYTE bVk, // virtual-key code BYTE bScan, // hardware scan code DWORD dwFlags, // flags specifying various function options DWORD dwExtraInfo // additional data associated WITH Keystroke); We must also know that the scan code cannot be used directly. To use the function mappvirtualkey to turn the key value to the scan code, the specific usage method of MapVirtualKey is as follows: uint mapvirtualKey

Uint ucode, // virtual-key code or scan code uint umaptype // translation to perform); Ok, ratio, this fast button is Ctrl A, let us see how the actual code is written:

keybd_event (VK_CONTROL, mapvirtualkey (VK_CONTROL, 0), 0,0); keybd_event (65, mapvirtualkey (65,0), 0,0); keybd_event (65, mapvirtualkey (65,0), keyeventf_keyup, 0); keybd_event ( VK_Control, MapVirtualKey (VK_Control, 0), KeyEventf_Keyup, 0);

First, simulate the CTRL button, then simulate press the A key, then simulate the A key, finally release the CTRL key, which is a cycle that simulates the shortcut. (Seeing this, almost a certain understanding of the simple exterior ~~~~ Do you try? If you give an imitation, you can have a better Dongdong, this is going to see your comprehension. ~~, but don't be happy too early, this is only starting, and there will be more complex Dongdong waiting for you ~~)

Copyright Description: You can copy, distribute, download this document freely. However, you may not take it, change this article, or use this article to see any form of interest.

转载请注明原文地址:https://www.9cbs.com/read-25311.html

New Post(0)