robotgo

package
v0.0.0-...-f5574b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package robotgo Go native cross-platform system automation.

Please make sure Golang, GCC, zlib and libpng is installed correctly before installing RobotGo;

See Requirements:

https://github.com/go-vgo/robotgo#requirements

Installation:

go get -u github.com/go-vgo/robotgo

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivePID

func ActivePID(pid int32)

ActivePID window active by PID

func AddEvent

func AddEvent(aeve string) int

AddEvent add event listener

func CaptureScreen

func CaptureScreen(args ...int) C.MMBitmapRef

CaptureScreen capture the screen return bitmap(c struct)

func Click

func Click(args ...interface{})

Click click the mouse

func CloseWindow

func CloseWindow()

CloseWindow close the window

func Drag

func Drag(x, y int)

Drag drag the mouse

func DragMouse

func DragMouse(x, y int)

DragMouse drag the mouse

func FindIds

func FindIds(name string) ([]int32, error)

FindIds find the process id by the process name

func FindName

func FindName(pid int32) (string, error)

FindName find the process name by the process id

func FindNames

func FindNames() ([]string, error)

FindNames find the all process name

func GetActive

func GetActive() C.MData

GetActive get the active window

func GetBHandle

func GetBHandle() int

GetBHandle get the window handle

func GetHandle

func GetHandle() int

GetHandle get the window handle

func GetMousePos

func GetMousePos() (int, int)

GetMousePos get mouse portion

func GetPID

func GetPID() int

GetPID get the process id

func GetPixelColor

func GetPixelColor(x, y int) string

GetPixelColor get pixel color

func GetScreenSize

func GetScreenSize() (int, int)

GetScreenSize get screen size

func GetTitle

func GetTitle() string

GetTitle get the window title

func GetVersion

func GetVersion() string

GetVersion get version

func GetXDisplayName

func GetXDisplayName() string

GetXDisplayName get XDisplay name

func IsValid

func IsValid() bool

IsValid valid the window

func KeyTap

func KeyTap(args ...interface{})

KeyTap tap the keyboard;

See keys:

https://github.com/go-vgo/robotgo/blob/master/docs/keys.md

func KeyToggle

func KeyToggle(args ...string) string

KeyToggle toggle the keyboard

See keys:

https://github.com/go-vgo/robotgo/blob/master/docs/keys.md

func LEvent

func LEvent(aeve string) int

LEvent add event listener, Wno-deprecated

func MouseClick

func MouseClick(args ...interface{})

MouseClick click the mouse

func MouseToggle

func MouseToggle(args ...interface{})

MouseToggle toggle the mouse

func Move

func Move(x, y int)

Move move the mouse

func MoveClick

func MoveClick(x, y int, args ...interface{})

MoveClick move and click the mouse

func MoveMouse

func MoveMouse(x, y int)

MoveMouse move the mouse

func MoveMouseSmooth

func MoveMouseSmooth(x, y int, args ...float64)

MoveMouseSmooth move the mouse smooth

func MoveSmooth

func MoveSmooth(x, y int, args ...float64)

MoveSmooth move the mouse smooth

func PidExists

func PidExists(pid int32) (bool, error)

PidExists determine whether the process exists

func Pids

func Pids() ([]int32, error)

Pids get the all process id

func ReadAll

func ReadAll() (string, error)

ReadAll read string from clipboard

func ScrollMouse

func ScrollMouse(x int, y string)

ScrollMouse scroll the mouse

func SetActive

func SetActive(win C.MData)

SetActive set the window active

func SetHandle

func SetHandle(hwnd int)

SetHandle set the window handle

func SetKeyDelay

func SetKeyDelay(x int)

SetKeyDelay set keyboard delay

func SetKeyboardDelay

func SetKeyboardDelay(x int)

SetKeyboardDelay set keyboard delay, Wno-deprecated

func SetMouseDelay

func SetMouseDelay(x int)

SetMouseDelay set mouse delay

func SetXDisplayName

func SetXDisplayName(name string) string

SetXDisplayName set XDisplay name

func ShowAlert

func ShowAlert(title, msg string, args ...string) int

ShowAlert show a alert window

func StopEvent

func StopEvent()

StopEvent stop event listener

func Try

func Try(fun func(), handler func(interface{}))

Try handler(err)

func TypeStr

func TypeStr(str string)

TypeStr type string, support UTF-8

func TypeStrDelay

func TypeStrDelay(x string, y int)

TypeStrDelay type string delayed

func TypeString

func TypeString(x string)

TypeString type string

func TypeStringDelayed

func TypeStringDelayed(x string, y int)

TypeStringDelayed type string delayed, Wno-deprecated

func WriteAll

func WriteAll(text string)

WriteAll write string to clipboard

Types

type Bitmap

type Bitmap struct {
	ImageBuffer   *uint8
	Width         int
	Height        int
	Bytewidth     int
	BitsPerPixel  uint8
	BytesPerPixel uint8
}

Bitmap is Bitmap struct

func BCaptureScreen

func BCaptureScreen(args ...int) Bitmap

BCaptureScreen capture the screen and return bitmap(go struct), Wno-deprecated

func GoCaptureScreen

func GoCaptureScreen(args ...int) Bitmap

GoCaptureScreen capture the screen and return bitmap(go struct)

type MPoint

type MPoint struct {
	// contains filtered or unexported fields
}

MPoint is MPoint struct

type Map

type Map map[string]interface{}

Map a map

type Nps

type Nps struct {
	Pid  int32
	Name string
}

Nps process struct

func Process

func Process() ([]Nps, error)

Process get the all process struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL