Sikuli - switch monitor and resolution invalidate scripts

I often switch between the laptop screen and an external 24-inch monitor, and I noticed that if I take pictures on my laptop, then if I ran the script when I connected to the 24-inch monitor, they no longer work. The same thing if I go the other way around, taking pictures from a 24-inch monitor, and then run the test on the laptop monitor.

I believe that this is due to different image resolutions; Is there a way to be "permission independent" while Sikuli is running? I considered taking pictures with different resolutions and placing everything in a list, and then analyzing the list one item at a time until I find a match; but I hope there is a more efficient way.

+4
source share
1 answer

There are a few things you can try (more info here ):

  • Turn off ClearType (Windows only)
  • Decrease similarity rating
  • Disable Smooth Borders for Screen Fonts (Windows only)

If the above is not useful, then not much can be done in terms of configuration. The only reliable solution is to support several sets of templates specific to each system.

+3
source

Source: https://habr.com/ru/post/1679208/


All Articles