Capturing screen into image

Terence Heaford t.heaford at icloud.com
Sat Jul 1 03:14:57 EDT 2017


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 formattedWidth of image "myImage"
set the height of image "myImage" to the formattedHeight of image "myImage"
print card from topleft of image "myImage" to bottomRight of image “myImage"

The image “myImage" on the screen seems to be the same as widget “Browser”
but the print card line of the script shows the grey bar at the top.


Any other ideas please.

Thanks

Terry 




> On 30 Jun 2017, at 22:48, Mark Schonewille via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> 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 image.
> 
> Kind regards,
> 
> Mark Schonewille
> http://economy-x-talk.com
> https://www.facebook.com/marksch
> 
> Buy the most extensive book on the
> LiveCode language:
> http://livecodebeginner.economy-x-talk.com
> 
> Op 30-Jun-17 om 20:38 schreef 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"
>> 
>> 
>> After placing the captured image into “myImage” there is a grey bar at the top and the full width of the image is not visible.
>> 
>> Am I doing something wrong?
>> 
>> 
>> Thanks
>> 
>> Terry
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list