I understand.....You have to litlle info to help me. Some times I don`t know what all I have to send you so you could help me.
It's not just that, to debug your setup, I'd have to actually reproduce it and try it. I'm happy to guess and try to point at places to look though.
I would need another warning. I`d need a warning not to overwrite an existing mape(file) if I forget to put a new shoot name. So I don`t overwrite the last created mape with the pictures.
FWIW, the code you posted looks like it would try to download anyway, after it prints "please choose a shoot name".
You add a return after that to avoid this, like
if n == "" then
printf("please choose a shoot name\n")
return
else
To warn if the name has already been used, you could check if the directory already exits, by adding something like
if lfs.attributes('imgdump/' .. self.shootname,'mode') == 'directory' then
printf("shoot name already used\n")
return
end
just above the commented out '-- self:cmdwait..."
And after the downlaod.....the function deletes the images too. I don`t want that. I have one other button for that that works very well.
To not delete, you can just remove the 'delete=true' from the self:download_images line,
but if you do that, it will download all images, every time. If that isn't what you want, you'll need to change the command to only download the most recent image. You can do this using lastimg=1 like I suggested earlier, but this may have some problems when the image counter changes (going from 9999 to 1 or whatever)