Aditional feature - Sikuli

Asked by juankardona on 2010-02-02

How can I implement screen capture with your software?. I have been looking for screen capture software but there is not any software open source. I think it will be great to program an application using your software and take decisions depending on software responses. I am looking for a solution to automate electric software wich have dinamic answers depending on date, number of events, etc. I cant take this responses with your software, and I cant use OCR software because I need 100% accuracy.

What do you recommend?

Thanks in advance

Juan Camilo Cardona
Electronic Engineer
Researcher Universidad Nacional de Colombia.

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
RaiMan (raimund-hocke) said : #1

I think they plan, to implement some OCR functionality, so you will be able to "read" the content of a subregion. Then you have text, that can further be analysed and used as base for decisions.

already now capture() can be used to store a region of the screen automatically, by setting (x, y, w, h). the images are stored as imagefiles inside the bundle, that can be handled with normal python. You have to implement some logic, to identify the correct file, since its not possible to give capture() a filename as parm.

The main problem with automation is, that Sikuli is not run as a background process, that can be triggered by external events, to start a related .skl.

Eileen Wei (eileenwei) said : #2

Hi RaiMan,

Can you explain a little bit more about how to retrieve the image file that's generated by capture(x, y, w, h)? I.e. where exactly it's located?

I wanted to capture the desktop screenshot and this is what I have in my sikuli script:

capture(0, 0, 100, 100)

I exported it as an executable .skl file, and run it from Windows command line, and here is what I got:

>Sikuli-IDE.bat captureScreenshot.skl
VDictProxy loaded.
ScreenMatchProxy loaded.
Win32Util loaded.
capture: java.awt.Rectangle[x=0,y=0,width=100,height=100]

I have checked the sikuli path and I can't see any image file. Can you help me?


RaiMan (raimund-hocke) said : #3

Just use the IDE directly, you can see more and you can play around, before packing something into an .skl.

in your case, try the following:

print capture(0,0,100,100)

run it and you will find a file name in the message area. Sikuli saves such image file in a temporary folder.
If you look for that file using the explorer (just copy and paste the path), you can admire ;-) your captured picture.

if you want to save these files at a defined place, you have to do some basic python.

If you tell me more about, what you want to do, I can help you, if you want.

If you want, we can communicate directly over my mail address, you find at

Can you help with this problem?

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

To post a message you must log in.