← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #245728]: Capture the screen and store the images into a path while running the script

 

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

    Status: Open => Answered

Eugene S proposed the following answer:
Hi,

Like I have mentioned here
https://answers.launchpad.net/sikuli/+question/245693, you can create a
kind of a helper function you can use.

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

This function gets the image name you would like to give it as a parameter.
And don't forget to import the shutil module and define your <Path> properly.


Cheers,
Eugene

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