-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.lua
More file actions
101 lines (101 loc) · 1.68 KB
/
example.lua
File metadata and controls
101 lines (101 loc) · 1.68 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
--Sleep testing:
--[[
print("time");
Sleep(0.1);
print("time");
Sleep(0.5);
print("time");
Sleep(1);
print("time");
Sleep(0.5);
print("time");
Sleep(0.1);
print("time");
]]--
--Mouse Testing:
--[[
MoveMouse(500, 500);
RClick();
RRelease();
Sleep(1);
MoveMouse(510, 505);
LClick();
Lelease();
]]--
--Keyboard Testing:
--Keyboard Char Testing:
--[[
KeyboardCharPress("A");
KeyboardCharRelease("A");
KeyboardCharPress("s");
KeyboardCharRelease("s");
KeyboardCharPress("s");
KeyboardCharRelease("s");
]]--
--Keyboard Command Key Testing
--[[
KeyboardKeyPress(Shift);
KeyboardCharPress("A");
KeyboardCharRelease("A");
KeyboardKeyRelease(Shift);
]]--
--Screenshto Test:
--[[
Screenshot(1, 200, 300, 400, 500);
]]--
--OCR Test:
--[[
Screenshot(1, 200, 300, 400, 500);
Sleep(1);
print(GetTextFromImage(1));
]]--
--Load image from location test
--[[
LoadImage(1,"Automata.png");
]]--
--Image Filtering:
--[[
LoadImage(1,"Automata.png");
Sleep(1);
Image to save to, images to filter
FilterImage(2, 1, 255, 0, 255, 0, 255, 0, 0);
]]--
--AlphaMasking:
--[[
LoadImage(1,"Automata.png");
Sleep(1);
FilterImage(1, 1, 255, 0, 255, 155, 255, 0, 0);
Sleep(1);
Image to save to, Image turn in to a mask
CreateMask(1,1);
Sleep(1);
LoadImage(2,"Automata.png");
Sleep(1);
Image to save to, image to apply mask to, mask
ApplyMask(3,2,1)
]]--
--Templet Matching:
--[[
LoadImage(2,"Automata.png");
Sleep(1);
print(FindTemplet(2,2));
]]--
--Obj Find:
--[[
LoadImage(1,"Automata.png");
Sleep(1);
FilterImage(1, 1, 255, 0, 255, 200, 255, 0, 0);
print(FindObject(1));
]]--
--Cropping
--[[
LoadImage(1,"Automata.png");
Sleep(1);
CropImage(1, 1, 20, 20, 50, 50);
]]--
--Image Show
--[[
LoadImage(1,"Automata.png");
Sleep(1);
ShowImage(1);
]]--