sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #57410
Re: [Question #698118]: my script reacts too slow when detecting the image, how to improve it?
Question #698118 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/698118
Description changed to:
I am making a script that make my character do the fishing automatically
fishButton = "fishingrod.png"
fishAppear = "exclamationMark.png"
getFish = Pattern("pullBackFishRod.png").targetOffset(2,0)
Settings.MoveMouseDelay = 0
# this three lines will click on the fishButton to drop the fish road to the sea
if exists(fishButton):
for x in range(4):
click (fishButton)
# after the fish rod drop to the sea, I wait for the fish to get hooked, when the fish get hooked, there will be an exclamation mark show up for about 1 second.
# so I wait for the fishAppear image to show up
wait(fishAppear, 2 * 60)
if exists(fishAppear):
for y in range(4):
click(getFish)
the problem now is: the getFish button only show up for like 1 second after the fish get hooked.
When the script detects fishAppear, then it take some time to click on the getFish button, which the getFish button already disappeared.
How can I make the script faster but so it can search the fishAppear image faster?
Thanks!
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.