← Back to team overview

sikuli-driver team mailing list archive

[Bug 1206879] [NEW] [1.0] Java: Screen.selectRegion()/userCapture() hang, when used in JFrame/JButton handler --- must be outside the handler

 

Public bug reported:

What I am trying to accomplish is to select an area on the screen with
the mouse (outside of the may frame) and get the resulting region
coordinates using Sikuli.

The code that should do this looks is below:

Screen screen = Screen.getPrimaryScreen();
Region region = screen.selectRegion("Select the area.");
What happens is that the cursor turns into a selector cross (the ones you usually see when you expect this function), but I can't select the area and actually the only way I can get back from the application is by killing it. Not too many examples I have found so I am asking for help here.

How can I make this work?

Also one other question:

I have downloaded the following script version:

Sikuli-IDE-1.0.0-Win64.zip

This means if I want to create a crossplatform solution I have to
include like 6 jars? I have found a more universal Java API it seems
(that is what it is called actually):

https://code.google.com/p/sikuli-api/

With all required supported OS but I can't find a single example on what
I am trying to do that is similar to the little code snippet I pasted
here. The sikuli script I am using now and this Sikuli API (apparently
not the same) seems to be just different enough to amke this difficult.

Any suggestions? Thanks a lot in advance.

** Affects: sikuli
     Importance: High
     Assignee: RaiMan (raimund-hocke)
         Status: In Progress

** Changed in: sikuli
       Status: New => In Progress

** Changed in: sikuli
   Importance: Undecided => High

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => 1.1.0

** Summary changed:

- [1.0] Java: Screen.selectRegion()/userCapture() hang, when used in JFrame/JButton handler
+ [1.0] Java: Screen.selectRegion()/userCapture() hang, when used in JFrame/JButton handler --- must be outside the handler

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

Title:
  [1.0] Java: Screen.selectRegion()/userCapture() hang, when used in
  JFrame/JButton handler --- must be outside the handler

Status in Sikuli:
  In Progress

Bug description:
  What I am trying to accomplish is to select an area on the screen with
  the mouse (outside of the may frame) and get the resulting region
  coordinates using Sikuli.

  The code that should do this looks is below:

  Screen screen = Screen.getPrimaryScreen();
  Region region = screen.selectRegion("Select the area.");
  What happens is that the cursor turns into a selector cross (the ones you usually see when you expect this function), but I can't select the area and actually the only way I can get back from the application is by killing it. Not too many examples I have found so I am asking for help here.

  How can I make this work?

  Also one other question:

  I have downloaded the following script version:

  Sikuli-IDE-1.0.0-Win64.zip

  This means if I want to create a crossplatform solution I have to
  include like 6 jars? I have found a more universal Java API it seems
  (that is what it is called actually):

  https://code.google.com/p/sikuli-api/

  With all required supported OS but I can't find a single example on
  what I am trying to do that is similar to the little code snippet I
  pasted here. The sikuli script I am using now and this Sikuli API
  (apparently not the same) seems to be just different enough to amke
  this difficult.

  Any suggestions? Thanks a lot in advance.

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


Follow ups

References