diff --git a/examples/README.md b/examples/README.md index e7ef069..af5c8ab 100644 --- a/examples/README.md +++ b/examples/README.md @@ -17,9 +17,10 @@ import ( ) func main() { - robotgo.ScrollMouse(10, "up") + // robotgo.ScrollMouse(10, "up") + robotgo.Scroll(0, 10) robotgo.MouseClick("left", true) - robotgo.MoveMouseSmooth(100, 200, 1.0, 100.0) + robotgo.MoveSmooth(100, 200, 1.0, 100.0) } ``` diff --git a/examples/bitmap/imgToBitmap/main.go b/examples/bitmap/imgToBitmap/main.go index 0d6d8a4..17a3df6 100644 --- a/examples/bitmap/imgToBitmap/main.go +++ b/examples/bitmap/imgToBitmap/main.go @@ -46,7 +46,7 @@ func test() { fx, fy := robotgo.FindBitmap(bit2) fmt.Println("FindBitmap------ ", fx, fy) - arr := robotgo.FindEveryBitmap(bit2) + arr := robotgo.FindAllBitmap(bit2) fmt.Println("Find every bitmap: ", arr) robotgo.SaveBitmap(bitmap, "test.png") } diff --git a/examples/bitmap/main.go b/examples/bitmap/main.go index 9c3662d..b9ae1ca 100644 --- a/examples/bitmap/main.go +++ b/examples/bitmap/main.go @@ -59,7 +59,7 @@ func findColor(bmp robotgo.CBitmap) { cnt1 := robotgo.CountColorCS(0xAADCDC, 10, 20, 30, 40) fmt.Println("count...", cnt1) - arr := robotgo.FindEveryColor(0xAADCDC) + arr := robotgo.FindAllColor(0xAADCDC) fmt.Println("find all color: ", arr) for i := 0; i < len(arr); i++ { fmt.Println("pos is: ", arr[i].X, arr[i].Y) @@ -160,7 +160,7 @@ func findBitmap(bmp robotgo.CBitmap) { fx, fy = robotgo.FindPic("test.tif") fmt.Println("FindPic------", fx, fy) - arr := robotgo.FindEveryBitmap(openbit) + arr := robotgo.FindAllBitmap(openbit) fmt.Println("find all bitmap: ", arr) for i := 0; i < len(arr); i++ { fmt.Println("pos is: ", arr[i].X, arr[i].Y) diff --git a/examples/mouse/main.go b/examples/mouse/main.go index 9380fb6..f797727 100644 --- a/examples/mouse/main.go +++ b/examples/mouse/main.go @@ -33,7 +33,7 @@ func move() { // smooth move the mouse to 100, 200 robotgo.MoveSmooth(100, 200) - robotgo.MoveMouseSmooth(100, 200, 1.0, 100.0) + robotgo.MoveSmooth(100, 200, 1.0, 100.0) robotgo.MoveSmoothRelative(10, -100, 1.0, 30.0) for i := 0; i < 1080; i += 1000 { @@ -68,13 +68,13 @@ func get() { func toggleAndScroll() { // scrolls the mouse either up - robotgo.ScrollMouse(10, "up") - robotgo.Scroll(100, 200) + // robotgo.ScrollMouse(10, "up") + robotgo.Scroll(100, 10) + robotgo.Scroll(0, -10) - // toggles right mouse button - robotgo.MouseToggle("down", "right") - - robotgo.MouseToggle("up") + // toggles the right mouse button + robotgo.Toggle("right") + robotgo.Toggle("right", "up") } func mouse() { diff --git a/test/main.go b/test/main.go index 4640216..27a6180 100644 --- a/test/main.go +++ b/test/main.go @@ -26,14 +26,14 @@ func aRobotgo() { x, y := robotgo.GetMousePos() fmt.Println("pos:", x, y) - robotgo.MoveMouse(x, y) - robotgo.MoveMouse(100, 200) + robotgo.Move(x, y) + robotgo.Move(100, 200) robotgo.MouseToggle("up") for i := 0; i < 1080; i += 1000 { fmt.Println(i) - robotgo.MoveMouse(800, i) + robotgo.Move(800, i) } fmt.Println(robotgo.GetPixelColor(x, y)) @@ -65,7 +65,7 @@ func aRobotgo() { fmt.Println("...type", reflect.TypeOf(bitTest), reflect.TypeOf(bitmapTest)) // robotgo.MouseClick() - robotgo.ScrollMouse(10, "up") + robotgo.Scroll(0, 10) } func main() {