← Back to team overview

sikuli-driver team mailing list archive

[Question #233257]: Capture a region JAVA sikuli

 

New question #233257 on Sikuli:
https://answers.launchpad.net/sikuli/+question/233257

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.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.