mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
Fix doc
This commit is contained in:
parent
dc6366ede5
commit
a5a084333b
20
doc.md
20
doc.md
@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
```Go
|
```Go
|
||||||
//Move the mouse to 100, 100 on the screen.
|
//Move the mouse to 100, 100 on the screen.
|
||||||
robotgo.MoveMouse(100, 100);
|
robotgo.MoveMouse(100, 100)
|
||||||
```
|
```
|
||||||
|
|
||||||
###.MoveMouseSmooth(x, y)
|
###.MoveMouseSmooth(x, y)
|
||||||
@ -113,7 +113,7 @@ robotgo.MoveMouse(100, 100);
|
|||||||
####Examples:
|
####Examples:
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
robogo.MouseClick();
|
robogo.MouseClick()
|
||||||
```
|
```
|
||||||
|
|
||||||
###.mouseToggle(down, button)
|
###.mouseToggle(down, button)
|
||||||
@ -128,7 +128,7 @@ robotgo.MoveMouse(100, 100);
|
|||||||
####Examples:
|
####Examples:
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
robot.MouseToggle("down");
|
robotgo.MouseToggle("down")
|
||||||
```
|
```
|
||||||
|
|
||||||
###.DragMouse(x, y)
|
###.DragMouse(x, y)
|
||||||
@ -143,10 +143,10 @@ robot.MouseToggle("down");
|
|||||||
|
|
||||||
```Go
|
```Go
|
||||||
//Mouse down at 0, 0 and then drag to 100, 100 and release.
|
//Mouse down at 0, 0 and then drag to 100, 100 and release.
|
||||||
robotgo.MoveMouse(0, 0);
|
robotgo.MoveMouse(0, 0)
|
||||||
robotgo.MouseToggle("down");
|
robotgo.MouseToggle("down")
|
||||||
robotgo.DragMouse(100, 100);
|
robotgo.DragMouse(100, 100)
|
||||||
robotgo.MouseToggle("up");
|
robotgo.MouseToggle("up")
|
||||||
```
|
```
|
||||||
|
|
||||||
###.GetMousePos()
|
###.GetMousePos()
|
||||||
@ -160,7 +160,7 @@ robotgo.MouseToggle("up");
|
|||||||
####Examples:
|
####Examples:
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
x,y := robotgo.GetMousePos();
|
x,y := robotgo.GetMousePos()
|
||||||
fmt.Println("pos:", x, y)
|
fmt.Println("pos:", x, y)
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -176,9 +176,9 @@ fmt.Println("pos:", x, y)
|
|||||||
####Examples:
|
####Examples:
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
robotgo.ScrollMouse(50, "up");
|
robotgo.ScrollMouse(50, "up")
|
||||||
|
|
||||||
robotgo.ScrollMouse(50, "down");
|
robotgo.ScrollMouse(50, "down")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
16
zh_doc.md
16
zh_doc.md
@ -139,7 +139,7 @@ robotgo.MoveMouse(100, 100);
|
|||||||
####例子:
|
####例子:
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
robot.MouseToggle("down");
|
robotgo.MouseToggle("down")
|
||||||
```
|
```
|
||||||
|
|
||||||
###.DragMouse(x, y)
|
###.DragMouse(x, y)
|
||||||
@ -155,10 +155,10 @@ robot.MouseToggle("down");
|
|||||||
|
|
||||||
```Go
|
```Go
|
||||||
//Mouse down at 0, 0 and then drag to 100, 100 and release.
|
//Mouse down at 0, 0 and then drag to 100, 100 and release.
|
||||||
robotgo.MoveMouse(0, 0);
|
robotgo.MoveMouse(0, 0)
|
||||||
robotgo.MouseToggle("down");
|
robotgo.MouseToggle("down")
|
||||||
robotgo.DragMouse(100, 100);
|
robotgo.DragMouse(100, 100)
|
||||||
robotgo.MouseToggle("up");
|
robotgo.MouseToggle("up")
|
||||||
```
|
```
|
||||||
|
|
||||||
###.GetMousePos()
|
###.GetMousePos()
|
||||||
@ -173,7 +173,7 @@ robotgo.MouseToggle("up");
|
|||||||
####例子:
|
####例子:
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
x,y := robotgo.GetMousePos();
|
x,y := robotgo.GetMousePos()
|
||||||
fmt.Println("pos:", x, y)
|
fmt.Println("pos:", x, y)
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -192,9 +192,9 @@ fmt.Println("pos:", x, y)
|
|||||||
####例子:
|
####例子:
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
robotgo.ScrollMouse(50, "up");
|
robotgo.ScrollMouse(50, "up")
|
||||||
|
|
||||||
robotgo.ScrollMouse(50, "down");
|
robotgo.ScrollMouse(50, "down")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user