Java: How to use Takescreenshot functionality?

Asked by Naveen

Hi ,
I have to replicate the Takescreenshot functionality of sikuli using java APIS.
what is the API used for implementing this feature ?
I would appreciate if you can share the source code of the functionality with me !

Thanks !

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
RaiMan (raimund-hocke) said :
#1

The Sikuli java API is here: http://sikuli.org/doc/java-x

What you need is here:
http://sikuli.org/doc/java-x/org/sikuli/script/Screen.html

have a look at the variants of
capture()

and for the interactive version
usercapture()

Revision history for this message
Naveen (naveennannapaneni1) said :
#2

Hi Raiman ,
Thanks for the swift response.
Can i get the implementation of capture method ?
If you can not provide the source code ,pls tell me what APIS you have used to get that functionality ?

Any help in this regard is greatly appreciated !

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

It are basically the features in Java.awt.Robot for supporting screenshots.

The source of Sikuli is here: https://github.com/sikuli/sikuli

and the source of the class Screen here:
https://github.com/sikuli/sikuli/blob/develop/sikuli-script/src/main/java/org/sikuli/script/Screen.java

Can you help with this problem?

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

To post a message you must log in.