sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #55536
Re: [Question #692019]: [request] Randomized mouse route from A to B?
Question #692019 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/692019
Stephan Timmers posted a new comment:
Thanks alot for your patience Manfred.
I'm going to paste the code im using now to test your piece:
#above this part is the whole bezier human mouse movement code thats incredibly long
# ----------- main script
Settings.MoveMouseDelay = 0
#Mouse.move(getBottomRight().offset(-300, -300)) # i think i need to delete this. <<<<<<<<<<<<<<<<<<<
#mouseMoveRandom(Region(0+80, 80, 10, 10), 50, 50) # and this. <<<<<<<<<<<<<<<<<<<<<<<
getlastmatch = "1595960559184.png"
if exists("1595960559184.png"):
mouseMoveRandom(getlastmatch(), 50, 50) # move the mouse randomly to a random spot in the image
click(Mouse.at()) # do a mouse-click where the mouse currently is
wait(random.randint(5,10))
When i used your code i got an error saying 'getlastmatch' is not defined so i defined it by making it the same as the image it should check for and click (both are the same image in this case).
if i run the above i get this error:
[error] script [ HumanMouseTest ] stopped with error in line 90
[error] TypeError ( 'str' object is not callable )
[error] --- Traceback --- error source first
line: module ( function ) statement
90: main ( <module> ) mouseMoveRandom(getlastmatch(), 50, 50) # move the mouse randomly to a random spot in the image
[error] --- Traceback --- end --------------
what am i doing wrong here?
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.