How to make the current screen invisible ?

Asked by Naveen

When we click on the Take screen shot button , the sikuli IDE becomes invisible for certain amount of time .
How to achieve this functionality ?

I would appreciate if you share any sample code with me .

Thanks in Advance !

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
j (j-the-k) said :
#1

I would use shortcuts for this purpose, e.g. as described here http://www.lytebyte.com/2008/01/31/how-to-minimize-and-maximize-windows-using-keyboard-shortcuts-in-xp-and-vista/ to minimize and maximize the applications. I don't know the code to make a window invisible as in the screen-capture mode. I don't think there is a python way to do this, you probably have to use some java code.

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

I am looking for the java code only.
Please gime the code snippet which does this functionality thru java .

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

I am looking for the code base thru which sikuli has implemented this functionality .

Revision history for this message
j (j-the-k) said :
#4

I think this is the right sourcefile https://github.com/sikuli/sikuli/blob/develop/sikuli-ide/src/main/java/org/sikuli/ide/CaptureButton.java look at line 177-200.
I think the invisibility is done with a simple JFrame.setVisible(false)
I don't know how to embed this into a sikuli script but I think there is a tutorial somewhere here.

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

Java classes can be imported and used in Sikuli scripts as you like, since Sikuli scripts are run through Jython interpreter.

So you might transpose nearly all Java code to Jython code useable in Sikuli scripts.

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.