SexScripts : Save webcam captures in different dir - https://ss.deviatenow.com:443/viewtopic.php?f=4&t=1050 Page 1 of 1

Save webcam captures in different dir

boy2spank [ Tue Aug 31, 2021 5:39 pm ]

I am playing with a script inspired by an old CM routine. But I don't want to just import that one, I want to go in a different direction.
One of the things that I want to do, is take pictures with a webcam and store them in a different directory than the default "captured" directory. I also want the pictures to have a name specified by the script so I can easily use them later.

For the life of me, I can't get that to work and I have been looking everywhere, including in other scripts that take webcam pictures. I can take webcam pictures, but they all end up on the "captured" directory with a random name such as "823609430.jpeg"

I am using this code below:
Code:
filename = "images/<scriptname>/captured/01.jpg"
filename = getImage("Taking photo...")
setImage(filename)
new File("images/<scriptname>/captured/01.jpg")


Please tell me what I'm doing wrong and how I can get the script to do what I want.

Re: Save webcam captures in different dir

doti [ Thu Sep 09, 2021 3:18 pm ]

You're not far from a good solution. here is what I would do (not tried myself) :
Code:
def filename2 = getDataFolder+"/images/<scriptname>/captured/01.jpg"
def filename1 = getImage("Taking photo...")
def file1 = new File(filename1)
file1.renameTo(filename2)

Re: Save webcam captures in different dir

boy2spank [ Sat Sep 25, 2021 12:17 am ]

Thank you for that tip, Doti!
I think I've got it to work now. :)

Page 1 of 1 All times are UTC + 1 hour [ DST ]
https://ss.deviatenow.com:443/
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010, 2011