Sikuli- IDE image save to desktop

Asked by Maniraj

I am Taking image through SIkuli-IDE and trying to save that image in my Desktop as .png File not as sikuli file for me it is not Working but previously i tried and saved.

Help me out i am Using 1.1.2 build sikuli Jars and IDE.

How to save that Takenscreenshots to my Deskop as .png File.

Thank you.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

I do not understand, why you want to have the shots on your desktop, but if you want ...

The IDE does not have a feature to directly store a shot to another folder than to the current script's folder (bundlepath).

The normal way, to get the images shot from the IDE elsewhere:
- save a new empty script to your Desktop (say as images.sikuli)
- make your shots
- save the script and close it in the IDE

rename images.sikuli on the Desktop to just images and you have your images in there.
You might now delete the contained non-png files.

... and a new option:
With latest 1.1.2 nightly from yesterday you can make a small script like this:

capture("make a shot for Desktop", "<path-to-folder>", input("image name"))

each time you run it, you will be asked for a name for your image (.png can be omitted) and the resulting image shot will be stored to the given folder (which might be your Desktop).

Revision history for this message
Best RaiMan (raimund-hocke) said :
#2
Revision history for this message
Maniraj (aathimaniraj) said :
#3

Thanks RaiMan, that solved my question.