Versions in this module Expand all Collapse all v1 v1.0.1 Feb 24, 2023 Changes in this version + const Alt + const AudioForward + const AudioMute + const AudioNext + const AudioPause + const AudioPlay + const AudioPrev + const AudioRandom + const AudioRepeat + const AudioRewind + const AudioStop + const AudioVolDown + const AudioVolUp + const Backspace + const CapA + const CapB + const CapC + const CapD + const CapE + const CapF + const CapG + const CapH + const CapI + const CapJ + const CapK + const CapL + const CapM + const CapN + const CapO + const CapP + const CapQ + const CapR + const CapS + const CapT + const CapU + const CapV + const CapW + const CapX + const CapY + const CapZ + const Capslock + const Center + const Cmd + const Control + const Ctrl + const Delete + const Down + const End + const Enter + const Esc + const Escape + const F1 + const F10 + const F11 + const F12 + const F13 + const F14 + const F15 + const F16 + const F17 + const F18 + const F19 + const F2 + const F20 + const F21 + const F22 + const F23 + const F24 + const F3 + const F4 + const F5 + const F6 + const F7 + const F8 + const F9 + const Home + const Insert + const Key0 + const Key1 + const Key2 + const Key3 + const Key4 + const Key5 + const Key6 + const Key7 + const Key8 + const Key9 + const KeyA + const KeyB + const KeyC + const KeyD + const KeyE + const KeyF + const KeyG + const KeyH + const KeyI + const KeyJ + const KeyK + const KeyL + const KeyM + const KeyN + const KeyO + const KeyP + const KeyQ + const KeyR + const KeyS + const KeyT + const KeyU + const KeyV + const KeyW + const KeyX + const KeyY + const KeyZ + const Lalt + const Lcmd + const Lctrl + const Left + const LightsKbdDown + const LightsKbdToggle + const LightsKbdUp + const LightsMonDown + const LightsMonUp + const Lshift + const Menu + const Mleft + const Mright + const Num0 + const Num1 + const Num2 + const Num3 + const Num4 + const Num5 + const Num6 + const Num7 + const Num8 + const Num9 + const NumClear + const NumDecimal + const NumDiv + const NumEnter + const NumEqual + const NumLock + const NumMinus + const NumMul + const NumPlus + const Pagedown + const Pageup + const Print + const Printscreen + const Ralt + const Rcmd + const Rctrl + const Right + const Rshift + const Shift + const Space + const Tab + const Up + const Version + const WheelDown + const WheelLeft + const WheelRight + const WheelUp + var DisplayID = -1 + var KeySleep = 0 + var Keycode = keycode.Keycode + var MouseMap = keycode.MouseMap + var MouseSleep = 0 + var NotPid bool + var Scale bool + var Special = keycode.Special + func ActiveName(name string) error + func ActivePid(pid int, args ...int) error + func ActivePidC(pid int, args ...int) error — js/wasm, linux/amd64 + 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 + func CharCodeAt(s string, n int) rune + func CheckMouse(btn string) C.MMMouseButton + func Click(args ...interface{}) + func CloseWindow(args ...int) + func CmdCtrl() string + 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 — windows/amd64 + func FreeBitmap(bitmap CBitmap) + func FreeBitmapArr(bit ...CBitmap) + func GetActive() 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 — windows/amd64 + func GetDisplayBounds(i int) (x, y, w, h int) + func GetHWND() win.HWND — windows/amd64 + func GetHWNDByPid(pid int) int + func GetHandPid(pid int, args ...int) C.MData + func GetHandle() int + func GetLocationColor(displayId ...int) string + func GetMain() win.HWND — windows/amd64 + func GetMainDPI() int — windows/amd64 + 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 — windows/amd64 + func GetText(imgPath string, args ...string) (string, error) + func GetTitle(args ...int) string + func GetVersion() string + func GetXDisplayName() string + func GetXid(xu *xgbutil.XUtil, pid int) (xproto.Window, error) — js/wasm, linux/amd64 + func GetXidFromPid(xu *xgbutil.XUtil, pid int) (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 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 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 OpenImg(path string) ([]byte, error) + func PadHex(hex C.MMRGBHex) string + func PadHexs(hex CHex) string + 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 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) — windows/amd64 + func ScaleF(displayId ...int) float64 — darwin/amd64, js/wasm, linux/amd64 + func ScaleFSys() float64 — windows/amd64 + func ScaleX() int + func Scaled(x int, displayId ...int) int + func Scaled0(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 — 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 SetForeg(hwnd win.HWND) bool — windows/amd64 + 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 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 + BitsPixel uint8 + BytesPerPixel uint8 + Bytewidth int + Height int + ImgBuf *uint8 + Width int + 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 Map map[string]interface + type Nps struct + Name string + Pid int + func Process() ([]Nps, error) + type Point struct + X int + Y int + type Rect struct + func GetDisplayRect(i int) Rect + func GetScreenRect(displayId ...int) Rect + type Size struct + H int + W int