← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #245693]: Append image to RTF file from Clipboard (PRINTSCREEN)

 

Question #245693 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/245693

    Status: Open => Answered

Eugene S proposed the following answer:
Hi,

That's one possible implementation:

def takeScreenShot(imageName):
	img = capture(SCREEN)
	shutil.move(img, 'C:\\<Path>\\%(appName)s.png' %{"appName": imageName})

The first command captures the whole screen and saves the an image file (.png) in temp folder. This image will be deleted once the script done running.
The second command will copy that temporary image to the desired location.

In addition, you can add timestamps or any other useful information to
the file name if desired.


Cheers,
Eugene

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