What can I do to prevent a ~300ms delay when an image is NOT found? (Sikuli 1.0.1, Java, Windows)
Hello,
I have searched the forums and while I have read posts that seem to apply to the problem I am having, I can not nail down a workable solution. I am using Sikuli 1.0.1, and I am coding in Java on a Windows 7 machine. I am also fairly new to coding in Java and using Sikuli.
My problem is this:
I have an array of 10 small images (10x15 pixles in size) that I iterate through looking for a match using r.exists (the region is 12x17 pixels) and when a match NOT found there seems to be a delay of ~300 ms before the next check is made.
Here is the code:
int i =0;
for(Pattern p : pNumberArray){
if(
return i;
}
System.
i++;
}
Here is the result when I run the above code.
12:19:01:032 Image not found
12:19:01:365 Image not found
12:19:01:698 Image not found
12:19:02:031 Image not found
12:19:02:364 Image not found
12:19:02:697 Image not found
I was hoping using a 0 for (r.exists(
I then read up on 'Settings.
Searching forum posts turned me on to 'Settings.ScanRate' (https:/
So all that being said, that leads to my questions:
1) I assumed that setting the timeout to 0 when using exists on a region (r.exists(
2) I assumed that setting 'Settings.
3) One post I read mentioned that there used to be an issue setting the values of Settings fields wouldn't work because the variables used a 'protected' modifier, but I can change the value and see the results of modifying the value between 'Settings.
4) I can't imagine it taking ~300ms to match a 10x15 pixel image in a 12x17 pixel search region. That 300ms isn't the amount of time it takes to actually search for a match in the region is it?
I spent hours and hours and hours reading forum posts and experimenting with different code combinations but I can't get rid of the ~300ms delay when an image is NOT found.
Thanks in advance for any wise words of wisdom!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: