Documentation ¶
Overview ¶
Package gotomation is cross-platform system automation library.
Index ¶
- Constants
- type KeyCode
- type KeyModifier
- type Keyboard
- func (k *Keyboard) KeyDown(code KeyCode, modifiers ...KeyModifier) error
- func (k *Keyboard) KeyPress(code KeyCode, modifiers ...KeyModifier) error
- func (k *Keyboard) KeyUp(code KeyCode, modifiers ...KeyModifier) error
- func (k *Keyboard) SetTypeSpeed(charPerMin int)
- func (k *Keyboard) Type(str string) error
- func (k *Keyboard) TypeQuickly(str string) error
- func (k *Keyboard) TypeSpeed() int
- type Mouse
- func (m *Mouse) Click() error
- func (m *Mouse) ClickWith(button MouseButton) error
- func (m *Mouse) DoubleClick() error
- func (m *Mouse) DoubleClickWith(button MouseButton) error
- func (m *Mouse) Drag(x, y int) error
- func (m *Mouse) DragWith(button MouseButton, x, y int) error
- func (m *Mouse) GetPosition() (x, y int)
- func (m *Mouse) Move(x, y int, duration time.Duration) error
- func (m *Mouse) MoveQuickly(x, y int) error
- func (m *Mouse) Scroll(x, y int, duration time.Duration) error
- func (m *Mouse) ScrollQuickly(x, y int) error
- type MouseButton
- type Screen
- func (s *Screen) Capture() (image.Image, error)
- func (s *Screen) CaptureRegion(rect image.Rectangle) (image.Image, error)
- func (s *Screen) Close()
- func (s *Screen) H() int
- func (s *Screen) ID() int
- func (s *Screen) Keyboard() *Keyboard
- func (s *Screen) Mouse() *Mouse
- func (s *Screen) RawCapture() (image.Image, error)
- func (s *Screen) RawCaptureRegion(rect image.Rectangle) (image.Image, error)
- func (s *Screen) W() int
- func (s *Screen) X() int
- func (s *Screen) Y() int
Constants ¶
View Source
const ( SHIFT KeyModifier = 0x0001 ALT = 0x0002 CONTROL = 0x0004 META = 0x0008 WIN = META COMMAND = META )
View Source
const ( VK_NOT_A_KEY KeyCode = 9999 VK_A = 30 VK_S = 31 VK_D = 32 VK_F = 33 VK_H = 35 VK_G = 34 VK_Z = 44 VK_X = 45 VK_C = 46 VK_V = 47 VK_B = 48 VK_Q = 16 VK_W = 17 VK_E = 18 VK_R = 19 VK_Y = 21 VK_T = 20 VK_1 = 2 VK_2 = 3 VK_3 = 4 VK_4 = 5 VK_6 = 7 VK_5 = 6 VK_EQUAL = 13 VK_9 = 10 VK_7 = 8 VK_MINUS = 12 VK_8 = 9 VK_0 = 11 VK_RIGHTBRACKET = 27 VK_O = 24 VK_U = 22 VK_LEFTBRACKET = 26 VK_I = 23 VK_P = 25 VK_L = 38 VK_J = 36 VK_QUOTE = 40 VK_K = 37 VK_SEMICOLON = 39 VK_BACKSLASH = 43 VK_COMMA = 51 VK_SLASH = 53 VK_N = 49 VK_M = 50 VK_PERIOD = 52 VK_GRAVE = 41 VK_BACKSPACE = 14 VK_DELETE = 111 VK_RETURN = 28 VK_TAB = 15 VK_ESCAPE = 1 VK_UP = 103 VK_DOWN = 108 VK_RIGHT = 106 VK_LEFT = 105 VK_HOME = 102 VK_END = 107 VK_PAGEUP = 104 VK_PAGEDOWN = 109 VK_F1 = 59 // VK_F1 VK_F2 = 60 // VK_F2 VK_F3 = 61 // VK_F3 VK_F4 = 62 // VK_F4 VK_F5 = 63 // VK_F5 VK_F6 = 64 // VK_F6 VK_F7 = 65 // VK_F7 VK_F8 = 66 // VK_F8 VK_F9 = 67 // VK_F9 VK_F10 = 68 // VK_F10 VK_F11 = 87 // VK_F11 VK_F12 = 88 // VK_F12 VK_F13 = VK_NOT_A_KEY VK_F14 = VK_NOT_A_KEY VK_F15 = VK_NOT_A_KEY VK_F16 = VK_NOT_A_KEY VK_F17 = VK_NOT_A_KEY VK_F18 = VK_NOT_A_KEY VK_F19 = VK_NOT_A_KEY VK_F20 = VK_NOT_A_KEY VK_ALT = 56 VK_LALT = 56 VK_RALT = 100 VK_CONTROL = 29 VK_LCONTROL = 29 VK_RCONTROL = 97 VK_SHIFT = 42 VK_LSHIFT = 42 VK_RSHIFT = 54 VK_LMENU = VK_NOT_A_KEY VK_RMENU = VK_NOT_A_KEY VK_LWIN = VK_NOT_A_KEY VK_RWIN = VK_NOT_A_KEY VK_META = VK_NOT_A_KEY VK_LMETA = VK_NOT_A_KEY VK_RMETA = VK_NOT_A_KEY VK_LCOMMAND = VK_NOT_A_KEY VK_RCOMMAND = VK_NOT_A_KEY VK_CAPSLOCK = 58 VK_SPACE = 57 VK_INSERT = 100 VK_SNAPSHOT = VK_NOT_A_KEY VK_NUMLOCK = 69 VK_SCROLL = 70 VK_NUMPAD_0 = VK_NOT_A_KEY VK_NUMPAD_1 = 79 VK_NUMPAD_2 = 80 VK_NUMPAD_3 = 81 VK_NUMPAD_4 = 75 VK_NUMPAD_5 = 76 VK_NUMPAD_6 = 77 VK_NUMPAD_7 = 71 VK_NUMPAD_8 = 72 VK_NUMPAD_9 = 73 VK_NUMPAD_DECIMAL = VK_NOT_A_KEY VK_NUMPAD_PLUS = 78 VK_NUMPAD_MINUS = 74 VK_NUMPAD_MUL = 55 VK_NUMPAD_DIV = 98 VK_NUMPAD_CLEAR = VK_NOT_A_KEY VK_NUMPAD_ENTER = 96 VK_NUMPAD_EQUAL = VK_NOT_A_KEY VK_AUDIO_VOLUME_MUTE = VK_NOT_A_KEY VK_AUDIO_VOLUME_DOWN = VK_NOT_A_KEY VK_AUDIO_VOLUME_UP = VK_NOT_A_KEY VK_AUDIO_PLAY = VK_NOT_A_KEY VK_AUDIO_STOP = VK_NOT_A_KEY VK_AUDIO_PREV = VK_NOT_A_KEY VK_AUDIO_NEXT = VK_NOT_A_KEY VK_LIGHTS_MON_UP = VK_NOT_A_KEY VK_LIGHTS_MON_DOWN = VK_NOT_A_KEY VK_LIGHTS_KBD_TOGGLE = VK_NOT_A_KEY VK_LIGHTS_KBD_UP = VK_NOT_A_KEY VK_LIGHTS_KBD_DOWN = VK_NOT_A_KEY VK_YEN = VK_NOT_A_KEY VK_UNDERSCORE = VK_NOT_A_KEY VK_KEYPAD_COMMA = VK_NOT_A_KEY VK_EISU = VK_NOT_A_KEY VK_KANA = VK_NOT_A_KEY VK_HANGUL = VK_NOT_A_KEY VK_JUNJA = VK_NOT_A_KEY VK_FINAL = VK_NOT_A_KEY )
View Source
const ( MouseLeft MouseButton = 1 MouseCenter = 2 MouseRight = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyModifier ¶
type KeyModifier uint16
type Keyboard ¶
type Keyboard struct {
// contains filtered or unexported fields
}
func (*Keyboard) KeyPress ¶
func (k *Keyboard) KeyPress(code KeyCode, modifiers ...KeyModifier) error
func (*Keyboard) SetTypeSpeed ¶
func (*Keyboard) TypeQuickly ¶
type Mouse ¶
type Mouse struct {
// contains filtered or unexported fields
}
func (*Mouse) ClickWith ¶
func (m *Mouse) ClickWith(button MouseButton) error
func (*Mouse) DoubleClick ¶
func (*Mouse) DoubleClickWith ¶
func (m *Mouse) DoubleClickWith(button MouseButton) error
func (*Mouse) GetPosition ¶
func (*Mouse) Move ¶
MoveMouse moves mouse cursor with Robert Penner's Easing Function: easeInOutCubic
func (*Mouse) MoveQuickly ¶
func (*Mouse) ScrollQuickly ¶
type MouseButton ¶
type MouseButton int
type Screen ¶
type Screen struct {
// contains filtered or unexported fields
}
func GetMainScreen ¶
func (*Screen) CaptureRegion ¶
func (*Screen) RawCaptureRegion ¶
Click to show internal directories.
Click to hide internal directories.