Re: Capturing screen into image

2017-07-02 Thread Terence Heaford via use-livecode
That’s cracked it. Thanks very much to everyone who has contributed. Not thought about this much but is having the print margins default to 72 the best option for most situations? This is one for better minds than I. Anyway, thanks again to all. Terry > On 2 Jul 2017, at 02:51, Paul

Re: Capturing screen into image

2017-07-01 Thread Paul Hibbert via use-livecode
Terry, If your concern is that the area of the card doesn’t print exactly as you see it on screen, it looks to me like the printMargins are set at the default 72 all round. Try setting the printMargins to 0 set the printMargins to "0,0,0,0" Paul Paul p...@livecode.org Mac OS Sierra

Re: Capturing screen into image

2017-07-01 Thread hh via use-livecode
@Terry. Because we make a snapshot this is independent of the browser's content. So at least for isolating the problem you will find below a variant that 'snapshots' directly to a file in your stack's folder. Then the file is opened with preview via applescript. Here I get exactly what I want.

Re: Capturing screen into image

2017-07-01 Thread Terence Heaford via use-livecode
Hi, Thanks for your suggestion but I am afraid it’s not working here: I have prepared a short movie on dropbox so you can see what happens when I print it and then open as PDF in MacOS Preview. Not sure at all what is going wrong. Could it be something to do with the scaling in the amCharts

Re: Capturing screen into image

2017-07-01 Thread hh via use-livecode
This works here. on mouseUp local ii="myImage", bb="Browser" if there is no img ii then create img ii put globalLoc(the topLeft of widget bb) into TL put globalLoc(the botRight of widget bb) into BR export snapshot from rect (TL,BR) to img ii as PNG hide widget bb -- avoid artefacts

Re: Capturing screen into image

2017-07-01 Thread Matt Maier via use-livecode
This is the script I use to capture screenshots from particular areas *on* snapCaptureButtMouseUp pLine *-- clicked in node details to capture a screenshot from the previously committed captureArea rect* *-- set the loc of stack "captureArea" to -1000,-1000* *-- close stack "captureArea"* *--

Re: Capturing screen into image

2017-07-01 Thread Terence Heaford via use-livecode
Thanks for your help. I have changed the script to below and it does not work. set the lockLoc of image "myImage" to false export snapshot from rectangle (the rect of widget "Browser") to pictVariable as PNG put pictVariable into image "myImage" set the width of image "myImage" to the

Re: Capturing screen into image

2017-06-30 Thread Mark Schonewille via use-livecode
Set the lockLoc of the image to false. Set the text of the image to the PNG data (you're doing this correctly), but don't set the rect of the image first. If necessary, set the width of the image to the formattedWidth of the image and set the height of the image to the formattedHeight of the

Capturing screen into image

2017-06-30 Thread Terence Heaford via use-livecode
This script does not work. export snapshot from rectangle (the rect of widget "Browser") to pictVariable as PNG set the rect of image "myImage" to the rect of widget "Browser" put pictVariable into image "myImage" print card from topleft of image "myImage" to bottomRight of image “myImage"