go-vgo / robotgo

RobotGo, Go Native cross-platform RPA and GUI automation @vcaesar
Apache License 2.0
9.6k stars 879 forks source link

bug in MoveClick()? #596

Closed MansonLuo closed 1 year ago

MansonLuo commented 1 year ago
hook.Register(hook.KeyDown, []string {"alt", "a"}, func(e hook.Event) {
    for _, pos := range listOfPos {
        robotgo.MoveClick(pos[0], pos[1])
    }
})

Description

it's cannot work properly when I use MoveClick(), but when I use MovesClick, everything is ok, so I wonder wheth MoveClick has bug,

Thanks ...

MansonLuo commented 1 year ago

below is my improved code:

robotgo.Move(one of listOfPos)
robotgo.Click()

it can move to expected position, but it didn't click, i don't know why.

Help

MansonLuo commented 1 year ago

Now, it's all works. it can move to correct position and click it.

func main() {
    robotgo.MouseSleep = 100

    ....
    robotgo.Move(one of listOfPos)
    robotgo.Click()
}
MansonLuo commented 1 year ago

but after build to exe, its behaviour become unexpected