← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #692019]: [request] Randomized mouse route from A to B?

 

Question #692019 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692019

    Status: Answered => Open

Stephan Timmers is still having a problem:
This looks pretty good. I see its indeed working and randomizing the
pattern and start and slowdown speed of the mouse. Looks very human
like.

I dont really know how I would apply this though. How do I apply this
behaviour everytime the mouse wants to move:

##### ABOVE THIS PART IS RAIMANS CODE ##########

a = Region(x, y, w, h) # define a as region, either by giving its
coordinates, or as a match from a find action, etc.

# ----------- main script
Settings.MoveMouseDelay = 0
Mouse.move(getBottomRight().offset(-300, -300))
mouseMoveRandom(Region(0+80, 80, 10, 10), 50, 50)

if exists(IMAGE):
 click(Location(random.randint(a.getX(),a.getX()+a.getW()),random.randint(a.getY(),a.getY()+a.getH())))

So i should define the region where it has to click (dont know how)
And i should define the usage of the human mousemovement to get to the location where it needs to click (also dont know how to).

Both region random click and the human mouse movements are new to me.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.