Page 1 of 1
export snapshot
Posted: Wed Feb 01, 2017 5:29 pm
by MaxV
What is the correct syntax of:
Code: Select all
export snapshot from rect tRect of this stack to file myFile AS JPEG
??
I wan to use a
rect with relative to stack coordinates, not to screen coordinates.
Re: export snapshot
Posted: Wed Feb 01, 2017 5:35 pm
by Klaus
Hi Max,
use "of this cd":
...
export snapshot from rect tRect of this cd to file (specialfolderpath("desktop") & "/test.jpg") AS JPEG
...
Tested and works!
Best
Klaus
Re: export snapshot
Posted: Wed Feb 01, 2017 5:42 pm
by MaxV
Thank Klaus, but I just discovered that my problem was elsewhere.
If I have an image, I change the file where the filename points to, I change the filename again to redfreh it... livecode doesn't do anything because the previous name and the current name are the same and so I doesn't refresh the image.
This is my workaround:
Code: Select all
repeat for each item tItem in lista
export snapshot from rect ( the rect of image titem ) of this card to file tItem AS JPEG
set the filename of image tItem to empty #!!!!!!! needed!!!!
set the filename of image tItem to tItem
end repeat
I was going crazy!!!