sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #26532
Re: [Question #250646]: JAVA: Multiple images in a short time.
Question #250646 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/250646
Status: Open => Answered
RaiMan proposed the following answer:
With observe() in the current shape, I would not recommend to use it in your case.
With 1.1.0 final in some weeks, it might make things a bit easier and faster in your case.
But already this should help a bit:
instead of
if (s.exists(Result_Defeat.toString()) != null){ // I think a closing bracket is missing here
use
if (s.exists(Result_Defeat.toString(), 0f) != null){
the parameter 0 tells the exists to only search once no matter if found
or not, which should be about 0.5 secs max instead of the standard 3
seconds if it does not appear.
Another option is to use a smaller region instead of the whole screen,
if you know, where about Result_Defeat.toString() should appear.
Since it looks like a game bot, it should be rather easy, to define the
expected region, since usually games have a rather fixed layout.
BTW: what is the reason for .toString() in Result_Defeat.toString()?
What object type is Result_Defeat?
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.