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
5d57bdf948
commit
a12789a17e
20
doc.md
20
doc.md
@ -95,7 +95,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)
|
||||||
@ -118,7 +118,7 @@ robotgo.MoveMouse(100, 100);
|
|||||||
####Examples:
|
####Examples:
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
robogo.MouseClick();
|
robogo.MouseClick()
|
||||||
```
|
```
|
||||||
|
|
||||||
###.mouseToggle(down, button)
|
###.mouseToggle(down, button)
|
||||||
@ -133,7 +133,7 @@ robotgo.MoveMouse(100, 100);
|
|||||||
####Examples:
|
####Examples:
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
robot.MouseToggle("down");
|
robotgo.MouseToggle("down")
|
||||||
```
|
```
|
||||||
|
|
||||||
###.DragMouse(x, y)
|
###.DragMouse(x, y)
|
||||||
@ -148,10 +148,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()
|
||||||
@ -165,7 +165,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)
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -181,9 +181,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")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
20
zh_doc.md
20
zh_doc.md
@ -103,7 +103,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)
|
||||||
@ -128,7 +128,7 @@ robotgo.MoveMouse(100, 100);
|
|||||||
####例子:
|
####例子:
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
robogo.MouseClick();
|
robogo.MouseClick()
|
||||||
```
|
```
|
||||||
|
|
||||||
###.mouseToggle(down, button)
|
###.mouseToggle(down, button)
|
||||||
@ -144,7 +144,7 @@ robotgo.MoveMouse(100, 100);
|
|||||||
####例子:
|
####例子:
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
robot.MouseToggle("down");
|
robotgo.MouseToggle("down")
|
||||||
```
|
```
|
||||||
|
|
||||||
###.DragMouse(x, y)
|
###.DragMouse(x, y)
|
||||||
@ -160,10 +160,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()
|
||||||
@ -178,7 +178,7 @@ robotgo.MouseToggle("up");
|
|||||||
####例子:
|
####例子:
|
||||||
|
|
||||||
```Go
|
```Go
|
||||||
x,y := robotgo.GetMousePos();
|
x,y := robotgo.GetMousePos()
|
||||||
fmt.Println("pos:", x, y)
|
fmt.Println("pos:", x, y)
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -197,9 +197,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