Page 2 of 2

Re: Saving a text file

Posted: Fri Jul 14, 2017 9:05 am
by jmburnod
Hi Bidge,
I tested your script

Code: Select all

export snapshot from cd "ImageAreaCard" of stack "ImageArea" to image "W1" of stack "ToPrint"
it works for me (LC indy 8.1.3, OS X 10.12.3)
What version of LC do you use ?
Best regards
Jean-Marc

Re: Saving a text file

Posted: Fri Jul 14, 2017 9:09 am
by bidgeeman
Hello Jean - Marc.
I had to go back to using Livecode 8.14 as I struck a terrible bug in V9.0. Not sure what was causing it as I went over the code several times and just could not get rid if it. In 8.14 it works like a charm.

Bidge

Re: Saving a text file

Posted: Fri Jul 14, 2017 4:36 pm
by Klaus
Hi David,
bidgeeman wrote:

Code: Select all

export snapshot from cd "ImageAreaCard" of stack "ImageArea" to image "W1" of stack "ToPrint"
that is NOT the code I posted, Sir!
So no wonder it uses GLOBAL screen coordinates as you experienced. 8)


Best

Klaus

Re: Saving a text file

Posted: Fri Jul 14, 2017 6:03 pm
by jmburnod
Hi Klaus,
I was surprised that

Code: Select all

export snapshot from cd "ImageAreaCard" of stack "ImageArea" to image "W1" of stack "ToPrint"
works. I also expected a snapshot of screen from 0,0.
Do you have an idea why ?
Best
Jean-Marc

Re: Saving a text file

Posted: Fri Jul 14, 2017 6:29 pm
by Klaus
Bonsoir Jean-Marc,

sorry, no idea why!?
Obviously this has changed in recent versions, but I still prefer to use the RECT syntax. :D


Best

Klaus

Re: Saving a text file

Posted: Sat Jul 15, 2017 12:44 am
by bidgeeman
Hi Klaus.
I actually used the "rect" part of the code as well.....as usual it was probably one of my typo's.
My apologies and again, thanks for pointing that out as I will go back and find the error.

Thanks
Bidge

Re: Saving a text file

Posted: Sat Jul 15, 2017 3:42 pm
by jacque
Klaus wrote:Obviously this has changed in recent versions, but I still prefer to use the RECT syntax. :D
One advantage of snapshotting an object instead of a rect is that you get the correct image even if the object is covered by another object, or is on a different card, or even on a different stack. It can even be offscreen. The snapshot can optionally include effects and metadata.

The reason Jean-Marc didn't get a full screen image is because the script specified a card object. To get a full screen shot it would need a rectangle in global coordinates.

Re: Saving a text file

Posted: Sat Jul 15, 2017 7:35 pm
by jmburnod
Hi Jacqueline,
Thanks for explanations
The reason Jean-Marc didn't get a full screen image is because the script specified a card object. To get a full screen shot it would need a rectangle in global coordinates.
You refresh my brain and I remember:

Code: Select all

import snapshot from rect (the rect of this cd) of this cd
import an image of current cd
Best regards
Jean-Marc