Page 1 of 1
export snapshot.
Posted: Wed Jul 18, 2018 11:51 am
by Googie85
Hi Guys!
I am trying to store a screenshot on my Android device.
Code: Select all
export snapshot from card "Main" at size 1536,2048 to file "test.png" as PNG
when the line of code is executed me device "stops".
Am I doing it wrong?
Many Thanks,
Googie.
Re: export snapshot.
Posted: Wed Jul 18, 2018 12:01 pm
by Klaus
Hi Googie,
if you do not provide an absolute pathname, the engine presumes "the defaultfolder",
which is the folder containing the engine and that is NOT writable, so your script
generates an error and stops!
Do this:
Code: Select all
...
## The only folder on mobile where we have definitvely write permissions:
put specialfolderpath("documents") & "/test.png" into tFile
export snapshot from card "Main" at size 1536,2048 to file tFile as PNG
...
Best
Klaus
Re: export snapshot.
Posted: Wed Jul 18, 2018 12:04 pm
by Googie85
Thanks for your reply Klaus!
I am trying to store the screenshot into a folder on the device...
Greatfully Appreciate Your Help!!!
Many Thanks,
Googie.