-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathmain.cpp
45 lines (38 loc) · 985 Bytes
/
main.cpp
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
/*
* This example was used for putting items into the action in Lineage 2 MMORPG.
*/
#include <iostream>
#include <string>
#include "mouse.h"
#include "keyboard.h"
int main()
{
Mouse mouse;
try {
mouse.initialize();
} catch (const std::runtime_error &e) {
std::cout << std::string("Mouse initialization: ") + e.what() << std::endl;
return EXIT_FAILURE;
}
Keyboard keyboard;
try {
keyboard.initialize();
} catch (const std::runtime_error &e) {
std::cout << std::string("Keyboard initialization: ") + e.what() << std::endl;
return EXIT_FAILURE;
}
Sleep(5000);
mouse.moveCursor(136, 271);
mouse.leftButtonClick();
Sleep(500);
mouse.moveCursor(56, 315);
mouse.leftButtonClick();
Sleep(500);
mouse.moveCursor(283, 350);
mouse.leftButtonClick();
Sleep(500);
mouse.moveCursor(275, 271);
mouse.leftButtonClick();
Sleep(500);
return EXIT_SUCCESS;
}