Versions in this module Expand all Collapse all v0 v0.101.0 Dec 22, 2021 Changes in this version + const Version + var KeySleep = 0 + var Keycode = keycode.Keycode + var MouseMap = keycode.MouseMap + var MouseSleep = 0 + var Special = keycode.Special + func ActiveName(name string) error + func ActivePID(pid int32, args ...int) error + func ActivePIDC(pid int32, args ...int) error — js/wasm, linux/amd64 + func AddEvent(key string) bool + func AddEvents(key string, arr ...string) bool + func AddMouse(btn string, x ...int16) bool + func AddMousePos(x, y int16) bool + func ByteToImg(b []byte) (image.Image, error) + func CaptureImg(args ...int) image.Image + func CaptureScreen(args ...int) C.MMBitmapRef + func CharCodeAt(s string, n int) rune + func CheckMouse(btn string) C.MMMouseButton + func Click(args ...interface{}) + func CloseWindow(args ...int32) + func DecodeImg(path string) (image.Image, string, error) + func Drag(x, y int, args ...string) + func DragMouse(x, y int, args ...interface{}) + func DragSmooth(x, y int, args ...interface{}) + func End() + func EventEnd() + func EventHook(when uint8, keysPressed []string, callback func(hook.Event)) + func EventProcess(events chan hook.Event) chan bool + func EventStart() chan hook.Event + func FindIds(name string) ([]int32, error) + func FindName(pid int32) (string, error) + func FindNames() ([]string, error) + func FindPath(pid int32) (string, error) + func FindWindow(name string) win.HWND — windows/amd64 + func FreeBitmap(bitmap C.MMBitmapRef) + func GetActive() C.MData + func GetBHandle() int + func GetBounds(pid int32, args ...int) (int, int, int, int) + func GetDPI(hwnd win.HWND) uint32 — windows/amd64 + func GetHWND() win.HWND — windows/amd64 + func GetHandPid(pid int32, args ...int32) C.MData + func GetHandle() int + func GetMainDPI() int — windows/amd64 + func GetMouseColor() string + func GetMousePos() (int, int) + func GetPID() int32 + func GetPixelColor(x, y int) string + func GetPxColor(x, y int) C.MMRGBHex + func GetScaleSize() (int, int) + func GetScreenSize() (int, int) + func GetSysDPI(idx int32, dpi uint32) int32 — windows/amd64 + func GetText(imgPath string, args ...string) (string, error) + func GetTitle(args ...int32) string + func GetVersion() string + func GetXDisplayName() string + func GetXId(xu *xgbutil.XUtil, pid int32) (xproto.Window, error) — js/wasm, linux/amd64 + func GetXidFromPid(xu *xgbutil.XUtil, pid int32) (xproto.Window, error) — js/wasm, linux/amd64 + 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 IsValid() bool + func KeyDown(key string) + func KeyPress(key string) + func KeyTap(tapKey string, args ...interface{}) string + func KeyToggle(key string, args ...string) string + func KeyUp(key string) + func Kill(pid int32) error + func MaxWindow(pid int32, args ...interface{}) + func MicroSleep(tm float64) + func MilliSleep(tm int) + func MinWindow(pid int32, args ...interface{}) + func MouseClick(args ...interface{}) + func MouseToggle(togKey string, args ...interface{}) int + func Move(x, y 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 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 OpenImg(path string) ([]byte, error) + func PadHex(hex C.MMRGBHex) string + func PasteStr(str string) string + func PidExists(pid int32) (bool, error) + func Pids() ([]int32, 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) error + func SaveImg(b []byte, path string) error + func SaveJpeg(img image.Image, path string) error + func SavePng(img image.Image, path string) error + func Scale() int + func Scale0() int + func ScaleF() float64 + func ScaleX() int + func ScaleY() int + func Scaled(x int) int + func Scaled0(x int, f float64) int + func Scroll(x, y int, args ...int) + func ScrollMouse(x int, direction string) + func ScrollRelative(x, y int, args ...int) + func ScrollSmooth(to int, args ...int) + func SendInput(nInputs uint32, pInputs unsafe.Pointer, cbSize int32) uint32 — windows/amd64 + func SendMsg(hwnd win.HWND, msg uint32, wParam, lParam uintptr) uintptr — windows/amd64 + func SetActive(win C.MData) + func SetActiveWindow(hwnd win.HWND) win.HWND — windows/amd64 + func SetDelay(d ...int) + func SetFocus(hwnd win.HWND) win.HWND — windows/amd64 + func SetHandle(hwnd int) + func SetHandlePid(pid int32, args ...int32) + func SetKeyDelay(delay int) + func SetKeyboardDelay(delay int) + func SetMouseDelay(delay int) + func SetXDisplayName(name string) string + func ShowAlert(title, msg string, args ...string) bool + func Sleep(tm int) + func Start() chan hook.Event + func StopEvent() + func StrToImg(data string) (image.Image, error) + func SysScale() float64 + func ToByteImg(img image.Image, fm ...string) []byte + func ToImage(bit C.MMBitmapRef) image.Image + func ToMMRGBHex(hex CHex) C.MMRGBHex + func ToRGBA(bit C.MMBitmapRef) *image.RGBA + func ToRGBAGo(bmp1 Bitmap) *image.RGBA + func ToStringImg(img image.Image, fm ...string) string + func ToUC(text string) []string + func ToUint8p(dst []uint8) *uint8 + func Toggle(key ...string) int + func Try(fun func(), handler func(interface{})) + func TypeStr(str string, args ...float64) + func TypeStrDelay(str string, delay int) + func TypeString(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) + func Width(img image.Image) int + func WriteAll(text string) error + type Bitmap struct + BitsPixel uint8 + BytesPerPixel uint8 + Bytewidth int + Height int + ImgBuf *uint8 + Width int + func GoCaptureScreen(args ...int) Bitmap + func ImgToBitmap(m image.Image) (bit Bitmap) + func RGBAToBitmap(r1 *image.RGBA) (bit Bitmap) + func ToBitmap(bit C.MMBitmapRef) Bitmap + type CBitmap C.MMBitmapRef + type CHex C.MMRGBHex + func UintToHex(u uint32) CHex + type Map map[string]interface + type Nps struct + Name string + Pid int32 + func Process() ([]Nps, error) + type Point struct + X int + Y int + type Rect struct + func GetScreenRect(displayId ...int) Rect + type Size struct + H int + W int