sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #55379
[Question #691800]: Cannot import name Vision
New question #691800 on Sikuli:
https://answers.launchpad.net/sikuli/+question/691800
Hi, I'm trying to make a code for a game that clicks immediately after the "image/pattern" appears. My problem is it's too slow, I require about 20-40ms of reaction time.
reg.wait("Get Ready Image",FOREVER)
reg.wait(Pattern("Click Me Image").similar(0.78),FOREVER)
click(reg.getLastMatch())
Settings.MoveMouseDelay = 0.0
Settings.WaitScanRate = 100
Settings.DelayBeforeMouseDown = 0.0
I played this command on https://humanbenchmark.com/tests/reactiontime and I got an average of 60-70ms. Also is changing DelayBeforeMouseDown changes it or is it already the default?. Is there a way to make it react faster without upgrading my hardware?
I have tried onChange() commands but I don't get why it still continues to click even though I called stopObserver().
reg.wait("Get Ready Image",FOREVER)
def react(event):
click(reg)
wait(0.5)
Settings.MoveMouseDelay = 0.0
Settings.ObserveScanRate = 100
Settings.DelayBeforeMouseDown = 0.0
reg.onAppear(Pattern("Click Me Image").similar(0.78),react)
reg.observe(FOREVER)
reg.stopObserver()
Thanks in advance!
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.