diff --git a/doc.md b/doc.md index fe2e2a4..59b52a5 100644 --- a/doc.md +++ b/doc.md @@ -1,38 +1,45 @@ #Methods: -##Keyboard -[Keys](#keys) -[SetKeyboardDelay](#SetKeyboardDelay) - KeyTap - KeyToggle - TypeString - TypeStringDelayed -##Mouse - SetMouseDelay - MoveMouse - MoveMouseSmooth - MouseClick - MouseToggle - DragMouse - GetMousePos - ScrollMouse -##Screen - GetPixelColor - GetScreenSize - CaptureScreen - GetXDisplayName(Linux) - SetXDisplayName(Linux) -##Bitmap +##[Keyboard](#Keyboard) + +###[Keys](#keys) +###[SetKeyboardDelay](#SetKeyboardDelay) +###[KeyTap](#KeyTap) +###[KeyToggle](#KeyToggle) +###[TypeString](#TypeString) +###[TypeStringDelayed](#TypeStringDelayed) + +##[Mouse](#Mouse) + +###[SetMouseDelay](#SetMouseDelay) +###[MoveMouse](#MoveMouse) +###[MoveMouseSmooth](#MoveMouseSmooth) +###[MouseClick](#MouseClick) +###[MouseToggle](#MouseToggle) +###[DragMouse](#DragMouse) +###[GetMousePos](#GetMousePos) +###[ScrollMouse](#ScrollMouse) + +##[Screen](#Screen) + +###[GetPixelColor](#GetPixelColor) +###[GetScreenSize](#GetScreenSize) +###[CaptureScreen](#CaptureScreen) +###[GetXDisplayName(Linux)](#GetXDisplayName) +###[SetXDisplayName(Linux)](#SetXDisplayName) + +##[Bitmap](#Bitmap) This is a work in progress. - FindBitmap - OpenBitmap - SaveBitmap - TostringBitmap - GetPortion +###[FindBitmap](#FindBitmap) +###[OpenBitmap](#OpenBitmap) +###[SaveBitmap](#SaveBitmap) +###[TostringBitmap](#TostringBitmap) +###[GetPortion](#GetPortion) -##Keyboard +##

Keyboard

+ ###

.SetKeyboardDelay(ms)

Sets the delay in milliseconds to sleep after a keyboard event. This is 10ms by default. @@ -50,7 +57,7 @@ key - See keys. modifier (optional, string or array) - Accepts alt, command (win), control, and shift. -###.KeyToggle(key, down, modifier) +###

.KeyToggle(key, down, modifier)

Hold down or release a key. @@ -66,7 +73,7 @@ string - The string to send. -###.TypeStringDelayed(string, cpm) +###

.TypeStringDelayed(string, cpm)

####Arguments: @@ -75,8 +82,9 @@ -##Mouse -###.SetMouseDelay(ms) +##

Mouse

+ +###

.SetMouseDelay(ms)

Sets the delay in milliseconds to sleep after a mouse event. This is 10ms by default. @@ -99,7 +107,7 @@ robotgo.MoveMouse(100, 100) ``` -###.MoveMouseSmooth(x, y) +###

.MoveMouseSmooth(x, y)

Moves mouse to x, y human like, with the mouse button up. @@ -122,7 +130,7 @@ robotgo.MoveMouse(100, 100) robogo.MouseClick() ``` -###.mouseToggle(down, button) +###

.MouseToggle(down, button)

Toggles mouse button. @@ -137,7 +145,7 @@ robotgo.MoveMouse(100, 100) robotgo.MouseToggle("down") ``` -###.DragMouse(x, y) +###

.DragMouse(x, y)

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) ``` -###.ScrollMouse(magnitude, direction) +###

.ScrollMouse(magnitude, direction)

Scrolls the mouse either up or down. @@ -188,8 +196,9 @@ robotgo.ScrollMouse(50, "down") ``` -##Screen -###.GetPixelColor(x, y) +##

Screen

+ +###

.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. @@ -201,7 +210,7 @@ robotgo.ScrollMouse(50, "down") Returns the hex color code of the pixel at x, y. -###.GetScreenSize() +###

.GetScreenSize()

Gets the screen width and height. @@ -209,7 +218,7 @@ robotgo.ScrollMouse(50, "down") Returns an object with .width and .height. -###.CaptureScreen +###

.CaptureScreen

//ScreenCapture Gets part or all of the screen. @@ -226,11 +235,11 @@ robotgo.ScrollMouse(50, "down") Returns a bitmap object. -##Bitmap +##

Bitmap

This is a work in progress. -###.FindBitmap +###

.FindBitmap

find bitmap. @@ -244,7 +253,7 @@ robotgo.ScrollMouse(50, "down") Returns a position x and y -###.OpenBitmap +###

.OpenBitmap

open bitmap . @@ -256,7 +265,7 @@ robotgo.ScrollMouse(50, "down") Returns a bitmap -###.SaveBitmap +###

.SaveBitmap

save a image with bitmap. @@ -271,7 +280,7 @@ robotgo.ScrollMouse(50, "down") Return a imgage -###.TostringBitmap +###

.TostringBitmap

bitmap to string @@ -283,7 +292,7 @@ robotgo.ScrollMouse(50, "down") Return a sting bitmap -###.GetPortion +###

.GetPortion

bitmap from a portion