← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #233894]: how to save a object to a file

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--1. p is a Match object, that only knows, where on the screen the
picture Vefifjf.png was found.

--2. Why do you want to save a picture, that you already have as file: <script folder>/Vefifjf.png
the file's path is:
import os # put it at the beginning of the script

pathImg = os.path.join(getBundlePath(), "Vefifjf.png")


--3. you might copy the picture to some other place using:
import shutil # put it at the beginning of the script

img = "Vefifjf.png"
p=find(img)
shutil.copy(img, "E:\\WorkPlc\\a.png") # switching to .jpg not possible this way

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