Which Screen Takes Screenshot

Asked by UNCCheezy

how does sikuli choose which screen gets to take screenshots?

I'm on mac 10.9 and sometimes it picks the screen I want an other times it doesn't. I can't seem to figure out how to make one or the other the screenshotable monitor.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
UNCCheezy (shawny2005) said :
#1

I did realize that in the docs it says, "Mac: The monitor, that has the System Menu Bar, is always Screen(0) and mapped to the default SCREEN."

on mavericks I wonder if this broke something. I tried swiching it while sikuli was open, and between closing it then opening it. It's always only one moniter that takes screenshots.

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

paste some typical code, you are using, where you think, it is going wrong.

With version 1.0.1 you can use showScreens() to printout your current settings as viewed from Sikuli.

Revision history for this message
UNCCheezy (shawny2005) said :
#3

This is the output. The issue is that the larger screen s1 is getting all the screenshots. I am unable to take a screenshot on s0, even thought it is the primary screen. (as said by sikuli)

[info] *** monitor configuration [ 2 Screen(s)] ***
[info] *** Primary is Screen 0
[info] Screen 0: S(0)[0,0 1280x800]
[info] Screen 1: S(1)[-468,-1200 1920x1200]
[info] *** end monitor configuration ***

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

-- I am unable to take a screenshot on s0
Do you mean taking a picture in the IDE using the command bar on the left or the screenshot button in the top left (camera)?

After you trigger the function, the screens get some darker, then move the mouse to the screen you want to take a shot, press the mouse button at the location you want to start, the screen should now have a red frame for some time, complete the screen shot selection and you should have what you want in the IDE.

If this is not so, then please start the IDE with runIDE.cmd -d3 -c from command line, do some test shoots and send me the output you get with some comments about the actions you did.

Revision history for this message
UNCCheezy (shawny2005) said :
#5

correct using the camera button in the IDE. I normally use ths shortcut to take pictures cmd + shift + 2

I tried the first answer, Didn't work. Not matter what I do, it always selects s1

I ran the ide with those command, so here is the output. I clicked the take picture button, and clicked the smaller screen right after, but the larger screen got the screenshot focus. I did that twice.

[debug] EditorConsolePane: init: stdout/stderr redirected to console

[debug] ResourceLoaderBasic: loadLib: MacHotkeyManager
[debug] ResourceLoaderBasic: loadLib: Found: MacHotkeyManager

[debug] ResourceLoaderBasic: loadLib: Now loaded: MacHotkeyManager
[debug] restore session: /Users/shawn/flix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/

[debug] SikuliEditorKit.read
[debug] ImageLocator: found 1387495343588.png in /Users/shawn/flix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-3783212145608464614.png

[debug] ImageLocator: found file_confirmation_window.png in /Users/shawn/flix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-6132027772204657780.png
[debug] ImageLocator: found import_flix_sources.png in /Users/shawn/flix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-1225573722002862286.png
[debug] ImageLocator: found 1389059265615.png in /Users/shawn/flix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-2111524509645092258.png
[debug] ImageLocator: found 1389059265615.png in /Users/shawn/flix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-7590223382602241615.png
[debug] ImageLocator: found 1387496349584.png in /Users/shawn/f

lix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-7315668043795442460.png
[debug] ImageLocator: found 1387496362738.png in /Users/shawn/flix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-5324677010851678385.png
[debug] ImageLocator: found 1390512885248.png in /Users/shawn/flix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-5462861863232730142.png

[debug] ImageLocator: found 1390513086271.png in /Users/shawn/flix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-5120717410071189841.png
[debug] ImageLocator: found 1387566882412.png in /Users/shawn/flix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-1612864813758809128.png
[debug] ImageLocator: found 1387566895880.png in /Users/shawn/flix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-3128062853848803621.png
[debug] ImageLocator: found 1389120127197.png in /Users/shawn/flix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-4334215866589946569.png
[debug] ImageLocator: found open_button.png in /Users/shawn/flix_qa/tests/4.8/71

014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-5566946251154316691.png
[debug] ImageLocator: found output_image.png in /Users/shawn/flix_qa/tests/4.8/71014_mac_import_img_sequence.sikuli/
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-4447487002774800180.png
[debug] restore session: /Users/shawn/Desktop/test_show_screens.sikuli/
[debug] SikuliEditorKit.read
[debug] Sikuli-IDE startup: 6390

[debug] capture!

[debug] ScreenUnion: capture: java.awt.Rectangle[x=-468,y=-1200,width=1920,height=2000]
[debug] Screen.capture: java.awt.Rectangle[x=-468,y=-1200,width=1920,height=2000]

[debug] RobotDesktop: captureScreen: on 1 using java.awt.Rectangle[x=0,y=0,width=1920,height=2000]

[debug] CapturePrompt: Select an image

[debug] ResourceLoaderBasic: loadLib: Is already loaded: MacUtil

[debug] ScreenUnion: getIdFromPoint: (878, 579) as (410, -621) in (-468, -1200, 1920, 2000) on 1
[debug] CapturePrompt: started at (878,579) as L(410,-621) on 1

[debug] CapturePrompt: finished at (1143,882) as L(675,-318) on 1

[debug] CapturePrompt.close: freeing resources
[debug] captureCompleted: /Users/shawn/Desktop/test_show_screens.sikuli/1399046777485.png
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-5397953614282504817.png

[debug] capture!

[debug] ScreenUnion: capture: java.awt.Rectangle[x=-468,y=-1200,width=1920,height=2000]
[debug] Screen.capture: java.awt.Rectangle[x=-468,y=-1200,width=1920,height=2000]

[debug] RobotDesktop: captureScreen: on 1 using java.awt.Rectangle[x=0,y=0,width=1920,height=2000]

[debug] CapturePrompt: Select an image

[debug] ScreenUnion: getIdFromPoint: (1180, 694) as (712, -506) in (-468, -1200, 1920, 2000) on 1
[debug] CapturePrompt: started at (1180,694) as L(712,-506) on 1

[debug] CapturePrompt: finished at (1326,835) as L(858,-365) on 1
[debug] CapturePrompt.close: freeing resources
[debug] captureCompleted: /Users/shawn/Desktop/test_show_screens.sikuli/1399046792420.png
[debug] FileManager: tempfile create: /var/folders/56/r7pqmzx9095cpxvybh3k6hp00000gn/T/sikuli-5148475888627108590.png

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

Looks weird indeed, but I cannot test it currently, since I do not have any system available with more than one monitor.
Earliest next week again.

Sorry.

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

The only thing I can offer:
download sikulix.jar from here:
https://dl.dropboxusercontent.com/u/42895525/SikuliX-1.1-Mac/sikulix.jar
put it in an empty folder and double click it to start the IDE (1.1.0-Beta1) and try the same things.

After the test, you should purge it again (official Bet1 will be available soon).

Can you help with this problem?

Provide an answer of your own, or ask UNCCheezy for more information if necessary.

To post a message you must log in.