← Back to team overview

sikuli-driver team mailing list archive

[Bug 2007980] Re: Screen size wrong when changing monitor scaling programatically --- workaround

 

And yeah I noticed that part :
'Be aware: The IDE GUI might look odd, because the changed monitor parameters do not seem to be recognised yet everywhere (a bug ;-).

Either reset the monitors programatically to what they where at start of
the script or restart the IDE.'

But that's not much of a problem, and I reset the user settings at the
end of the script.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to SikuliX.
https://bugs.launchpad.net/bugs/2007980

Title:
  Screen size wrong when changing monitor scaling programatically ---
  workaround

Status in SikuliX:
  In Progress

Bug description:
  ------------- workaround
  after changing the monitor setup programmatically (e.g. scaling factor), you have to use:
  Screen.resetMonitors()
  to let SikuliX reevaluate the monitor setup.

  This works when running scripts from command line or in Java programs.

  Be aware: The IDE GUI might look odd, because the changed monitor
  parameters do not seem to be recognised yet everywhere (a bug ;-).

  Either reset the monitors programatically to what they where at start
  of the script or restart the IDE.

  --------------------------------------------------

  To avoid most of the resolution problems of Sikuli, I chnage within my script the user windows desktop resolution (100% - 125% - 150% and 175%) and i put it by default at 125%. The thing is that Sikuli is only looking in the old resolution (for example, if i go from 150% to 125%, a large part of the bottom and right side of the screen won't be detected, so if I need to find() something here, it will never be able to). I don't know if it is fixable but i might just post it here.
  I am using version 2.0.5 under windows 10 64 bits.
  Tried it on Java 8 and Java 17, both have the same problem.
  If you want to reproduce the bug, just make a script which changes windows resolution, then try to find something like the Wi-Fi logo on the bottom rigt part of the screen. You can also open SikuliIDE while being at 150% or 175%, then switch back to 125% and take a screenshot with the IDE tool made for it, you will se the part of the screen that is ignored.
  I know that relaunching SikuliIDE fixes it, but it is in the case that it is needed to switch it inside the script, for portability between different persons laptops.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/2007980/+subscriptions



References