Managing the use of different monitors attached to laptop

Asked by Brad Hagen

I am finding Sikuli to be a great solution to my testing project but have ran into something I can use a little guidance on.

I have 2 different docking stations I plug my laptop into. The screen resolution on the 2 monitors is different (1920x1080 vs 1920x1200). When I'm connected to the docking station with a lower resolution (1920x1080) the matching preview doesn't display the bottom area of the screen.

When I start Sikuli I see the following:

+++ running this Java
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) Client VM (build 25.144-b01, mixed mode, sharing)
+++ trying to run SikuliX
+++ using: -Xms64M -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine -jar C:\sikulix\sikulix.jar
Oct 27, 2017 6:10:20 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.
[info] HotkeyManager: add Capture Hotkey: CTRL+SHIFT 2 (50, 3)
[info] HotkeyManager: add Abort Hotkey: ALT+SHIFT C (67, 9)
[error] IDE: Remembered window not valid. Going to primary screen

If I check the screens and bounds I get the following:
print "Screens: ", getNumberScreens()
print "Bounds: ", getBounds()
Screens: 1
Bounds: java.awt.Rectangle[x=0,y=0,width=1920,height=1080]

Is there a configuration somewhere I can adjust for this situation or how can I manage this so I can select between the two?

Thanks in advance

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:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

What version of SikuliX?

What happens, if you stop the IDE in that case and restart the IDE?

The Preview window is moveable/resizeable (as a workaround).

Revision history for this message
Brad Hagen (bhagen) said :
#2

Hi Thanks for quick reply!

Version - 1.1.1-20170329.230420-154.
[debug (10/18/17 10:01:30 AM)] RunSetup: getMavenJar: sikulixlibswin-1.1.1-20170329.230420-154.jar

I have tried starting and stopping the IDE and get the same results. I'm not sure I understand how to move/resize the preview window beyond using the windows controls to maximize the window or move it by clicking on the title bar and dragging it.

I'm trying to click the start icon in my script but it isn't found. If I try the preview the bottom of my screen is missing. I would attach a screenshot but I don't see a way to attach files here.

Revision history for this message
RaiMan (raimund-hocke) said :
#3

please start IDE using
runsikulix.cmd -d 3

on a command line and paste debug output here.

If you do not want to show your private details, you can send me an e-mail to sikulix--at--outlook--dot--com with whatever you want to attach.

Revision history for this message
Brad Hagen (bhagen) said :
#4

Okay - I see now, sorry I somehow missed that! Should I be worried about
clearing any cache as I am making changes and moving/renaming files and
directories? I really like this application and appreciate all the work you
have put into it.

Brad

On Fri, Oct 27, 2017 at 9:04 AM, RaiMan <
<email address hidden>> wrote:

> Your question #660049 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/660049
>
> Linked to bug: #1728090
> https://bugs.launchpad.net/bugs/1728090
> "[1.1.1] IDE: Preview window does not show complete desktop, when
> first opened --- workaround"
>
> --
> You received this question notification because you asked the question.
>

--

Brad Hagen

Dev Ops Engineer | Motorola Solutions

3131 Elliott Avenue | Suite 200 | Seattle, WA 98121 | USA

P: +1.206.812.2375 | F: +1.206.812.0737

*<email address hidden> <email address hidden> | *
http://www.motorolasolutions.com
<http://www.motorolasolutions.com/en_us.html>

Revision history for this message
Best RaiMan (raimund-hocke) said :
#5

If you come back with questions in that forum, please post a new question for different topics. Do not ask new questions in comments of other questions.

--- Should I be worried about clearing any cache as I am making changes and moving/renaming files and
directories?
If you really plan to make more serious things with SikuliX, you should read (at least across) the docs.
Get familiar with concepts like importing or running scripts from other scripts and especially the image path feature.
Have a strict naming convention for your images, scripts and folders.
Switch on the "save before run" in the IDE, to not loose stuff on IDE crashes (be sure they happen, especially in cases, where you did not save your stuff before run ;-).
Renaming/Moving is safe as long as you do it inside the IDE - never rename script folders and their content outside the IDE!

Revision history for this message
Brad Hagen (bhagen) said :
#6

Thanks - much appreciated!