← Back to team overview

sikuli-driver team mailing list archive

[Question #148652]: change the captured file name --- use shutil.move()

 

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

Description changed to:
--- possible solution ------------

img = Screen(0).capture(27,170,963,159) # now contains filename in temp
folder

import shutil
shutil.move (img, "path-and-name.png") # moves img to destination

e.g. move it to your current .sikuli:

import os.path
shutil.move (img, os.path.join(getBundlePath(), "some-name.png")

--------------------------------------------------------

Hi all,

I'm new of Sikuli user, I would like to ask some question about screen
capture from Sikuli.

1. Is it possible to custom naming for screen capture from Sikuli (e.g.
I don't want the file name like this: "sikuli-
scr-3162482795590467766.png", I want it to be like "Abc_123_abc.png")

2. Is it possible to custom the save path of screen capture from Sikuli,
default it will be stored in Temp folder, I would like to stored in
let's say C:/SikuliProjectScreem/...

Thank you for all reply

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