Replies: 1 comment
-
Because Use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I haven't been able to get robotgo to run (I'm on Windows 10) even while using the sample codes provided in the git examples. I switched to MINGW but it didn't help. I keep getting these errors:
[Running] go run "s:\go_projects\tmp4.test.methods.go"
github.com/go-vgo/robotgo
C:\Users\J\go\pkg\mod\github.com\go-vgo\robotgo@v0.94.1\hook.go:94:17: invalid operation: geve == 0 (mismatched types bool and untyped int)
C:\Users\J\go\pkg\mod\github.com\go-vgo\robotgo@v0.94.1\ps.go:23:9: cannot use ps.Pids() (value of type []int) as type []int32 in return statement
C:\Users\J\go\pkg\mod\github.com\go-vgo\robotgo@v0.94.1\ps.go:28:22: cannot use pid (variable of type int32) as type int in argument to ps.PidExists
C:\Users\J\go\pkg\mod\github.com\go-vgo\robotgo@v0.94.1\ps.go:37:4: cannot use nps[i].Pid (variable of type int) as type int32 in struct literal
C:\Users\J\go\pkg\mod\github.com\go-vgo\robotgo@v0.94.1\ps.go:49:21: cannot use pid (variable of type int32) as type int in argument to ps.FindName
C:\Users\J\go\pkg\mod\github.com\go-vgo\robotgo@v0.94.1\ps.go:61:9: cannot use ps.FindIds(name) (value of type []int) as type []int32 in return statement
C:\Users\J\go\pkg\mod\github.com\go-vgo\robotgo@v0.94.1\ps.go:66:21: cannot use pid (variable of type int32) as type int in argument to ps.FindPath
C:\Users\J\go\pkg\mod\github.com\go-vgo\robotgo@v0.94.1\ps.go:71:17: cannot use pid (variable of type int32) as type int in argument to ps.Kill
C:\Users\J\go\pkg\mod\github.com\go-vgo\robotgo@v0.94.1\robotgo.go:1196:25: cannot use b (variable of type []byte) as type image.Image in argument to imgo.Save:
[]byte does not implement image.Image (missing At method)
My code:
package main
import (
"fmt"
"github.com/go-vgo/robotgo"
)
func main() {
robotgo.TypeStr("Hello World")
robotgo.TypeStr("だんしゃり", 0, 1)
// robotgo.TypeStr("テストする")
robotgo.TypeStr("Hi, Seattle space needle, Golden gate bridge, One world trade center.")
robotgo.TypeStr("Hi galaxy, hi stars, hi MT.Rainier, hi sea. こんにちは世界.")
robotgo.Sleep(1)
// ustr := uint32(robotgo.CharCodeAt("Test", 0))
// robotgo.UnicodeType(ustr)
robotgo.KeySleep = 100
robotgo.KeyTap("enter")
// robotgo.TypeStr("en")
robotgo.KeyTap("i", "alt", "cmd")
arr := []string{"alt", "cmd"}
robotgo.KeyTap("i", arr)
robotgo.MilliSleep(100)
robotgo.KeyToggle("a")
robotgo.KeyToggle("a", "up")
robotgo.WriteAll("Test")
text, err := robotgo.ReadAll()
if err == nil {
fmt.Println(text)
}
}
Beta Was this translation helpful? Give feedback.
All reactions