-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoc.txt
More file actions
206 lines (194 loc) · 14.9 KB
/
Copy pathdoc.txt
File metadata and controls
206 lines (194 loc) · 14.9 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
package robotgo // import "github.com/go-vgo/robotgo"
Package robotgo Go native cross-platform system automation.
Please make sure Golang, GCC is installed correctly before installing RobotGo;
See Requirements:
https://github.com/go-vgo/robotgo#requirements
Installation:
With Go module support (Go 1.11+), just import:
import "github.com/go-vgo/robotgo"
Otherwise, to install the robotgo package, run the command:
go get -u github.com/go-vgo/robotgo
+bulid linux,next
+bulid windows,next
const KeyA = "a" ...
const Mleft = "left" ...
const Version = "v1.00.0.1189, MT. Baker!"
var MouseSleep = 0 ...
var Keycode = keycode.Keycode
var MouseMap = keycode.MouseMap
var Special = keycode.Special
func ActiveName(name string) error
func ActivePid(pid int, args ...int) error
func Alert(title, msg string, args ...string) bool
func ByteToImg(b []byte) (image.Image, error)
func Capture(args ...int) (*image.RGBA, error)
func CaptureImg(args ...int) (image.Image, error)
func CharCodeAt(s string, n int) rune
func CheckMouse(btn string) C.MMMouseButton
func Click(args ...interface{}) error
func ClickV1(args ...interface{})
func CloseMainDisplay()
func CloseWindow(args ...int)
func CmdCtrl() string
func CmdV() error
func DecodeImg(path string) (image.Image, string, error)
func DisplaysNum() int
func Drag(x, y int, args ...string)
func DragMouse(x, y int, args ...interface{})
func DragSmooth(x, y int, args ...interface{})
func FindIds(name string) ([]int, error)
func FindName(pid int) (string, error)
func FindNames() ([]string, error)
func FindPath(pid int) (string, error)
func FindWindow(name string) win.HWND
func FreeBitmap(bitmap CBitmap)
func FreeBitmapArr(bit ...CBitmap)
func GetActiveC() C.MData
func GetBHandle() int
func GetBounds(pid int, args ...int) (int, int, int, int)
func GetClient(pid int, args ...int) (int, int, int, int)
func GetDPI(hwnd win.HWND) uint32
func GetDesktopWindow() win.HWND
func GetDisplayBounds(i int) (x, y, w, h int)
func GetHWND() win.HWND
func GetHWNDByPid(pid int) int
func GetHandByPidC(pid int, args ...int) C.MData
func GetHandle() int
func GetLocationColor(displayId ...int) string
func GetMain() win.HWND
func GetMainDPI() int
func GetMainId() int
func GetMousePos() (int, int)
func GetPid() int
func GetPixelColor(x, y int, displayId ...int) string
func GetPxColor(x, y int, displayId ...int) C.MMRGBHex
func GetScaleSize(displayId ...int) (int, int)
func GetScreenSize() (int, int)
func GetSysDPI(idx int32, dpi uint32) int32
func GetText(imgPath string, args ...string) (string, error)
func GetTitle(args ...int) string
func GetVersion() string
func GetXDisplayName() string
func GoString(char *C.char) string
func Height(img image.Image) int
func HexToRgb(hex uint32) *C.uint8_t
func ImgSize(path string) (int, int, error)
func Is64Bit() bool
func IsMain(displayId int) bool
func IsValid() bool
func KeyDown(key string, args ...interface{}) error
func KeyPress(key string, args ...interface{}) error
func KeyTap(key string, args ...interface{}) error
func KeyToggle(key string, args ...interface{}) error
func KeyUp(key string, args ...interface{}) error
func Kill(pid int) error
func Location() (int, int)
func MaxWindow(pid int, args ...interface{})
func MicroSleep(tm float64)
func MilliSleep(tm int)
func MinWindow(pid int, args ...interface{})
func MouseButtonString(btn C.MMMouseButton) string
func MouseClick(args ...interface{})
func MouseDown(key ...interface{}) error
func MouseUp(key ...interface{}) error
func Move(x, y int, displayId ...int)
func MoveArgs(x, y int) (int, int)
func MoveClick(x, y int, args ...interface{})
func MoveMouse(x, y int)
func MoveMouseSmooth(x, y int, args ...interface{}) bool
func MoveRelative(x, y int)
func MoveScale(x, y int, displayId ...int) (int, int)
func MoveSmooth(x, y int, args ...interface{}) bool
func MoveSmoothRelative(x, y int, args ...interface{})
func MovesClick(x, y int, args ...interface{})
func Mul(x int) int
func MultiClick(button string, count int, click ...bool) error
func OpenImg(path string) ([]byte, error)
func PadHex(hex C.MMRGBHex) string
func PadHexs(hex CHex) string
func Paste(str string) error
func PasteStr(str string) error
func PidExists(pid int) (bool, error)
func Pids() ([]int, error)
func Read(path string) (image.Image, error)
func ReadAll() (string, error)
func RgbToHex(r, g, b uint8) C.uint32_t
func Run(path string) ([]byte, error)
func Save(img image.Image, path string, quality ...int) error
func SaveCapture(path string, args ...int) error
func SaveImg(b []byte, path string) error
func SaveJpeg(img image.Image, path string, quality ...int) error
func SavePng(img image.Image, path string) error
func Scale0() int
func Scale1() int
func ScaleF(displayId ...int) (f float64)
func ScaleX() int
func Scaled(x int, displayId ...int) int
func Scaled0(x int, f float64) int
func Scaled1(x int, f float64) int
func Scroll(x, y int, args ...int)
func ScrollDir(x int, direction ...interface{})
func ScrollRelative(x, y int, args ...int)
func ScrollSmooth(to int, args ...int)
func SendInput(nInputs uint32, pInputs unsafe.Pointer, cbSize int32) uint32
func SendMsg(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr
func SetActive(win Handle)
func SetActiveC(win C.MData)
func SetActiveWindow(hwnd win.HWND) win.HWND
func SetDelay(d ...int)
func SetFocus(hwnd win.HWND) win.HWND
func SetForeg(hwnd win.HWND) bool
func SetHandle(hwnd int)
func SetHandlePid(pid int, args ...int)
func SetXDisplayName(name string) error
func Sleep(tm int)
func StrToImg(data string) (image.Image, error)
func SysScale(displayId ...int) float64
func ToByteImg(img image.Image, fm ...string) []byte
func ToImage(bit CBitmap) image.Image
func ToInterfaces(fields []string) []interface{}
func ToMMBitmapRef(bit CBitmap) C.MMBitmapRef
func ToMMRGBHex(hex CHex) C.MMRGBHex
func ToRGBA(bit CBitmap) *image.RGBA
func ToRGBAGo(bmp1 Bitmap) *image.RGBA
func ToStringImg(img image.Image, fm ...string) string
func ToStrings(fields []interface{}) []string
func ToUC(text string) []string
func ToUint8p(dst []uint8) *uint8
func Toggle(key ...interface{}) error
func Try(fun func(), handler func(interface{}))
func Type(str string, args ...int)
func TypeDelay(str string, delay int)
func TypeStr(str string, args ...int)
func TypeStrDelay(str string, delay int)
func TypeStringDelayed(str string, delay int)
func U32ToHex(hex C.uint32_t) C.MMRGBHex
func U8ToHex(hex *C.uint8_t) C.MMRGBHex
func UnicodeType(str uint32, args ...int)
func Width(img image.Image) int
func WriteAll(text string) error
type Bitmap struct{ ... }
func CaptureGo(args ...int) Bitmap
func ImgToBitmap(m image.Image) (bit Bitmap)
func RGBAToBitmap(r1 *image.RGBA) (bit Bitmap)
func ToBitmap(bit CBitmap) Bitmap
type CBitmap C.MMBitmapRef
func ByteToCBitmap(by []byte) CBitmap
func CaptureScreen(args ...int) CBitmap
func ImgToCBitmap(img image.Image) CBitmap
func ToCBitmap(bit Bitmap) CBitmap
type CHex C.MMRGBHex
func UintToHex(u uint32) CHex
type Handle C.MData
func GetActive() Handle
func GetHandById(id int, args ...int) Handle
func GetHandByPid(pid int, args ...int) Handle
func GetHandPid(pid int, args ...int) Handle
type Map map[string]interface{}
type Nps struct{ ... }
func Process() ([]Nps, error)
type Point struct{ ... }
type Rect struct{ ... }
func GetDisplayRect(i int) Rect
func GetScreenRect(displayId ...int) Rect
type Size struct{ ... }