mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-24 10:19:01 +00:00
Merge pull request #498 from go-vgo/bitmap-pr
Add more key and mouse examples and Update CI
This commit is contained in:
commit
8ba7338861
5 changed files with 17 additions and 7 deletions
|
|
@ -5,7 +5,7 @@ jobs:
|
|||
docker:
|
||||
# using custom image, see .circleci/images/primary/Dockerfile
|
||||
# - image: govgo/robotgoci:1.10.3
|
||||
- image: golang:1.17.8
|
||||
- image: golang:1.18.1
|
||||
working_directory: /gopath/src/github.com/go-vgo/robotgo
|
||||
steps:
|
||||
- checkout
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# FROM golang:1.10.1
|
||||
FROM golang:1.17.8-stretch AS build
|
||||
FROM golang:1.18.1-stretch AS build
|
||||
# FROM govgo/go:1.11.1
|
||||
|
||||
RUN apt update && apt install -y --no-install-recommends \
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ environment:
|
|||
PATH: C:\msys64\mingw32\bin\;C:\Program Files (x86)\NSIS\;%PATH%
|
||||
# - COMPILER: MINGW_W64
|
||||
# ARCHITECTURE: x64
|
||||
GOVERSION: 1.17.8
|
||||
GOVERSION: 1.18.1
|
||||
# GOPATH: c:\gopath
|
||||
|
||||
# scripts that run after cloning repository
|
||||
|
|
|
|||
|
|
@ -74,6 +74,14 @@ func keyTap() {
|
|||
robotgo.KeyTap("a", "control")
|
||||
}
|
||||
|
||||
func special() {
|
||||
robotgo.TypeStr("{}")
|
||||
robotgo.KeyTap("[", "]")
|
||||
|
||||
robotgo.KeyToggle("(")
|
||||
robotgo.KeyToggle("(", "up")
|
||||
}
|
||||
|
||||
func keyToggle() {
|
||||
// robotgo.KeySleep = 150
|
||||
robotgo.KeyToggle(robotgo.KeyA)
|
||||
|
|
@ -113,6 +121,7 @@ func key() {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typeStr()
|
||||
special()
|
||||
|
||||
keyTap()
|
||||
keyToggle()
|
||||
|
|
|
|||
|
|
@ -25,9 +25,7 @@ func move() {
|
|||
// move the mouse to 100, 200
|
||||
robotgo.Move(100, 200)
|
||||
|
||||
// robotgo.Drag(10, 10)
|
||||
// robotgo.Drag(20, 20, "right")
|
||||
//
|
||||
// drag mouse with smooth
|
||||
robotgo.DragSmooth(10, 10)
|
||||
robotgo.DragSmooth(100, 200, 1.0, 100.0)
|
||||
|
||||
|
|
@ -37,7 +35,7 @@ func move() {
|
|||
robotgo.MoveSmoothRelative(10, -100, 1.0, 30.0)
|
||||
|
||||
for i := 0; i < 1080; i += 1000 {
|
||||
fmt.Println(i)
|
||||
fmt.Println("i: ", i)
|
||||
// MoveMouse(800, i)
|
||||
robotgo.Move(800, i)
|
||||
}
|
||||
|
|
@ -74,6 +72,9 @@ func toggleAndScroll() {
|
|||
robotgo.Scroll(100, 10)
|
||||
robotgo.Scroll(0, -10)
|
||||
|
||||
robotgo.Toggle("left")
|
||||
robotgo.Toggle("left", "up")
|
||||
|
||||
// toggles the right mouse button
|
||||
robotgo.Toggle("right")
|
||||
robotgo.Toggle("right", "up")
|
||||
|
|
|
|||
Loading…
Reference in a new issue