sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #17305
Re: [Question #225953]: Save name or picture captured on a file txt
Question #225953 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/225953
Status: Open => Answered
RaiMan proposed the following answer:
after type(Key.PRINTSCREEN)
the screenshot is on the clipboard, which you cannot access easily from Sikuli (if it contains grafical content). You would have to simulate a workflow the same way, you would do manually (open some app, where you could add the image using CTRL-V and then save the file where you want).
But if you intention is to make screenshots and save them for later:
import os
import shutil
dir = "some path where you want to store the shots"
img = capture(SCREEN) # stores a shot as temp file
imgNew = "some unique image name"
shutil.move(img, os.path.join(dir, imgNew + ".png"))
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.