New question #258736 on Sikuli:
https://answers.launchpad.net/sikuli/+question/258736
After discovering some unexpected behaviour in my Script; I decided to run a
test to pin it down.
I discovered the following:
Match m = Screen.getScreen(0).exists("pathtoimage",10)
System.out.println(null == m);
Match n = Screen.getScreen(0).exists(ImageIO.read(new File("pathtoimage")),10)
System.out.println(null == n);
The first statement uses a String path to the image,
the third statement uses a BufferedImage object (which it creates from the file
which is found by the very same string from before.)
the second and the fourth statement are both expected to print false, as the
image in question is open on the main screen;
however the output is the following:
Dez 07, 2014 10:47:03 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root
0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
2
false
[error] Region.exists: seems that imagefile could not be found on disk
true
The reason why I work with BufferedImage objects is to reduce the Workload each
time I search for a Image that was searched for previously. (I have 32 gbytes
of ram that can be filled with all the images it wants, but I don't want the
script to acces the harddisk if it can be avoided)
Does anyone know how this situation arises?
I also understand German
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp