mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-03 07:33:55 +00:00
Update doc
This commit is contained in:
parent
3c62c9fb41
commit
026cff5848
103
doc.md
103
doc.md
@ -1,38 +1,45 @@
|
|||||||
#Methods:
|
#Methods:
|
||||||
|
|
||||||
##Keyboard
|
##[Keyboard](#Keyboard)
|
||||||
[Keys](#keys)
|
|
||||||
[SetKeyboardDelay](#SetKeyboardDelay)
|
###[Keys](#keys)
|
||||||
KeyTap
|
###[SetKeyboardDelay](#SetKeyboardDelay)
|
||||||
KeyToggle
|
###[KeyTap](#KeyTap)
|
||||||
TypeString
|
###[KeyToggle](#KeyToggle)
|
||||||
TypeStringDelayed
|
###[TypeString](#TypeString)
|
||||||
##Mouse
|
###[TypeStringDelayed](#TypeStringDelayed)
|
||||||
SetMouseDelay
|
|
||||||
MoveMouse
|
##[Mouse](#Mouse)
|
||||||
MoveMouseSmooth
|
|
||||||
MouseClick
|
###[SetMouseDelay](#SetMouseDelay)
|
||||||
MouseToggle
|
###[MoveMouse](#MoveMouse)
|
||||||
DragMouse
|
###[MoveMouseSmooth](#MoveMouseSmooth)
|
||||||
GetMousePos
|
###[MouseClick](#MouseClick)
|
||||||
ScrollMouse
|
###[MouseToggle](#MouseToggle)
|
||||||
##Screen
|
###[DragMouse](#DragMouse)
|
||||||
GetPixelColor
|
###[GetMousePos](#GetMousePos)
|
||||||
GetScreenSize
|
###[ScrollMouse](#ScrollMouse)
|
||||||
CaptureScreen
|
|
||||||
GetXDisplayName(Linux)
|
##[Screen](#Screen)
|
||||||
SetXDisplayName(Linux)
|
|
||||||
##Bitmap
|
###[GetPixelColor](#GetPixelColor)
|
||||||
|
###[GetScreenSize](#GetScreenSize)
|
||||||
|
###[CaptureScreen](#CaptureScreen)
|
||||||
|
###[GetXDisplayName(Linux)](#GetXDisplayName)
|
||||||
|
###[SetXDisplayName(Linux)](#SetXDisplayName)
|
||||||
|
|
||||||
|
##[Bitmap](#Bitmap)
|
||||||
This is a work in progress.
|
This is a work in progress.
|
||||||
|
|
||||||
FindBitmap
|
###[FindBitmap](#FindBitmap)
|
||||||
OpenBitmap
|
###[OpenBitmap](#OpenBitmap)
|
||||||
SaveBitmap
|
###[SaveBitmap](#SaveBitmap)
|
||||||
TostringBitmap
|
###[TostringBitmap](#TostringBitmap)
|
||||||
GetPortion
|
###[GetPortion](#GetPortion)
|
||||||
|
|
||||||
|
|
||||||
##Keyboard
|
##<h2 id="Keyboard">Keyboard</h2>
|
||||||
|
|
||||||
###<h3 id="SetKeyboardDelay">.SetKeyboardDelay(ms)</h3>
|
###<h3 id="SetKeyboardDelay">.SetKeyboardDelay(ms)</h3>
|
||||||
|
|
||||||
Sets the delay in milliseconds to sleep after a keyboard event. This is 10ms by default.
|
Sets the delay in milliseconds to sleep after a keyboard event. This is 10ms by default.
|
||||||
@ -50,7 +57,7 @@
|
|||||||
key - See keys.
|
key - See keys.
|
||||||
modifier (optional, string or array) - Accepts alt, command (win), control, and shift.
|
modifier (optional, string or array) - Accepts alt, command (win), control, and shift.
|
||||||
|
|
||||||
###.KeyToggle(key, down, modifier)
|
###<h3 id="KeyToggle">.KeyToggle(key, down, modifier)</h3>
|
||||||
|
|
||||||
Hold down or release a key.
|
Hold down or release a key.
|
||||||
|
|
||||||
@ -66,7 +73,7 @@
|
|||||||
|
|
||||||
string - The string to send.
|
string - The string to send.
|
||||||
|
|
||||||
###.TypeStringDelayed(string, cpm)
|
###<h3 id="TypeStringDelayed">.TypeStringDelayed(string, cpm)</h3>
|
||||||
|
|
||||||
####Arguments:
|
####Arguments:
|
||||||
|
|
||||||
@ -75,8 +82,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
##Mouse
|
##<h2 id="Mouse">Mouse</h2>
|
||||||
###.SetMouseDelay(ms)
|
|
||||||
|
###<h3 id="SetMouseDelay">.SetMouseDelay(ms)</h3>
|
||||||
|
|
||||||
Sets the delay in milliseconds to sleep after a mouse event. This is 10ms by default.
|
Sets the delay in milliseconds to sleep after a mouse event. This is 10ms by default.
|
||||||
|
|
||||||
@ -99,7 +107,7 @@
|
|||||||
robotgo.MoveMouse(100, 100)
|
robotgo.MoveMouse(100, 100)
|
||||||
```
|
```
|
||||||
|
|
||||||
###.MoveMouseSmooth(x, y)
|
###<h3 id="MoveMouseSmooth">.MoveMouseSmooth(x, y)</h3>
|
||||||
|
|
||||||
Moves mouse to x, y human like, with the mouse button up.
|
Moves mouse to x, y human like, with the mouse button up.
|
||||||
|
|
||||||
@ -122,7 +130,7 @@ robotgo.MoveMouse(100, 100)
|
|||||||
robogo.MouseClick()
|
robogo.MouseClick()
|
||||||
```
|
```
|
||||||
|
|
||||||
###.mouseToggle(down, button)
|
###<h3 id="MouseToggle">.MouseToggle(down, button)</h3>
|
||||||
|
|
||||||
Toggles mouse button.
|
Toggles mouse button.
|
||||||
|
|
||||||
@ -137,7 +145,7 @@ robotgo.MoveMouse(100, 100)
|
|||||||
robotgo.MouseToggle("down")
|
robotgo.MouseToggle("down")
|
||||||
```
|
```
|
||||||
|
|
||||||
###.DragMouse(x, y)
|
###<h3 id="DragMouse">.DragMouse(x, y)</h3>
|
||||||
|
|
||||||
Moves mouse to x, y instantly, with the mouse button held down.
|
Moves mouse to x, y instantly, with the mouse button held down.
|
||||||
|
|
||||||
@ -170,7 +178,7 @@ x,y := robotgo.GetMousePos()
|
|||||||
fmt.Println("pos:", x, y)
|
fmt.Println("pos:", x, y)
|
||||||
```
|
```
|
||||||
|
|
||||||
###.ScrollMouse(magnitude, direction)
|
###<h3 id="ScrollMouse">.ScrollMouse(magnitude, direction)</h3>
|
||||||
|
|
||||||
Scrolls the mouse either up or down.
|
Scrolls the mouse either up or down.
|
||||||
|
|
||||||
@ -188,8 +196,9 @@ robotgo.ScrollMouse(50, "down")
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
##Screen
|
##<h2 id="Screen">Screen</h2>
|
||||||
###.GetPixelColor(x, y)
|
|
||||||
|
###<h3 id="GetPixelColor">.GetPixelColor(x, y)
|
||||||
|
|
||||||
Gets the pixel color at x, y. This function is perfect for getting a pixel or two, but if you'll be reading large portions of the screen use screen.capture.
|
Gets the pixel color at x, y. This function is perfect for getting a pixel or two, but if you'll be reading large portions of the screen use screen.capture.
|
||||||
|
|
||||||
@ -201,7 +210,7 @@ robotgo.ScrollMouse(50, "down")
|
|||||||
|
|
||||||
Returns the hex color code of the pixel at x, y.
|
Returns the hex color code of the pixel at x, y.
|
||||||
|
|
||||||
###.GetScreenSize()
|
###<h3 id="GetScreenSize">.GetScreenSize()</h3>
|
||||||
|
|
||||||
Gets the screen width and height.
|
Gets the screen width and height.
|
||||||
|
|
||||||
@ -209,7 +218,7 @@ robotgo.ScrollMouse(50, "down")
|
|||||||
|
|
||||||
Returns an object with .width and .height.
|
Returns an object with .width and .height.
|
||||||
|
|
||||||
###.CaptureScreen
|
###<h3 id="CaptureScreen">.CaptureScreen</h3>
|
||||||
//ScreenCapture
|
//ScreenCapture
|
||||||
|
|
||||||
Gets part or all of the screen.
|
Gets part or all of the screen.
|
||||||
@ -226,11 +235,11 @@ robotgo.ScrollMouse(50, "down")
|
|||||||
|
|
||||||
Returns a bitmap object.
|
Returns a bitmap object.
|
||||||
|
|
||||||
##Bitmap
|
##<h3 id="Bitmap">Bitmap</h2>
|
||||||
|
|
||||||
This is a work in progress.
|
This is a work in progress.
|
||||||
|
|
||||||
###.FindBitmap
|
###<h3 id="FindBitmap">.FindBitmap</h3>
|
||||||
|
|
||||||
find bitmap.
|
find bitmap.
|
||||||
|
|
||||||
@ -244,7 +253,7 @@ robotgo.ScrollMouse(50, "down")
|
|||||||
Returns a position x and y
|
Returns a position x and y
|
||||||
|
|
||||||
|
|
||||||
###.OpenBitmap
|
###<h3 id="OpenBitmap">.OpenBitmap</h3>
|
||||||
|
|
||||||
open bitmap .
|
open bitmap .
|
||||||
|
|
||||||
@ -256,7 +265,7 @@ robotgo.ScrollMouse(50, "down")
|
|||||||
|
|
||||||
Returns a bitmap
|
Returns a bitmap
|
||||||
|
|
||||||
###.SaveBitmap
|
###<h3 id="SaveBitmap">.SaveBitmap</h3>
|
||||||
|
|
||||||
save a image with bitmap.
|
save a image with bitmap.
|
||||||
|
|
||||||
@ -271,7 +280,7 @@ robotgo.ScrollMouse(50, "down")
|
|||||||
Return a imgage
|
Return a imgage
|
||||||
|
|
||||||
|
|
||||||
###.TostringBitmap
|
###<h3 id="TostringBitmap">.TostringBitmap</h3>
|
||||||
|
|
||||||
bitmap to string
|
bitmap to string
|
||||||
|
|
||||||
@ -283,7 +292,7 @@ robotgo.ScrollMouse(50, "down")
|
|||||||
|
|
||||||
Return a sting bitmap
|
Return a sting bitmap
|
||||||
|
|
||||||
###.GetPortion
|
###<h3 id="GetPortion">.GetPortion</h3>
|
||||||
|
|
||||||
bitmap from a portion
|
bitmap from a portion
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user