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

    Status: Open => Answered

RaiMan proposed the following answer:
new File(baseImg.getSub(m.x, m.y, 150, 150).asFile()).renameTo(new
File(<TargetPath>));

... for File.rename() the folder structure must exist, otherwise it
silently does nothing.

to assure the folder structure:

new File(<targetPath>).mkdirs()
new File(baseImg.getSub(m.x, m.y, 150, 150).asFile()).renameTo(new 
File(<TargetPath>, "someFile.png"));

now <targetPath> should only be the absolute path to the folder where
you want to store the images

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to