Browser Snapshot

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Browser Snapshot

Post by doobox » Mon Aug 24, 2015 10:41 am

Hi there,

For LC 6.7 Mac OS X application.

Reading around old posts, I am thinking revBrowserSnapshot has been broken for ever, and it does still appear to be broken for me in LC6.7

Code: Select all

local tSnapshot
revBrowserSnapshot tBrowserID, "tSnapshot"
Error = "card id 1002: execution error at line 29 (Chunk: no such object) near "browser", char 22"

Not 100% sure if this would have even done what I want anyway.
What I'd like to do is take a snapshot of the browser, but the browser will be off the visible card.
Using export snapshot from rect or from object with global co-ords, won't shoot the browser in my tests because, well, its not visible at those off card co-ords, the window below is.

So the question is this.. Is there any way to take a snapshot of a browser that is not within the bounds of the current card.?
Kind Regards
Gary

https://www.doobox.co.uk

MaxV
Posts: 1574
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: Browser Snapshot

Post by MaxV » Mon Aug 31, 2015 9:55 am

This code works for me on windows:

Code: Select all

on mouseUp
   local myImage
   revBrowserSnapshot bowserID, "myImage"
   set the imagedata of image 1 to myImage
end mouseUp
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Re: Browser Snapshot

Post by doobox » Mon Aug 31, 2015 10:37 am

I am afraid this does not seem to work on OS X using the stable version of 6.7.
Generates the error shown in my post above.
Kind Regards
Gary

https://www.doobox.co.uk

zaxos
Posts: 222
Joined: Thu May 23, 2013 11:15 pm
Location: Greece

Re: Browser Snapshot

Post by zaxos » Mon Aug 31, 2015 12:54 pm

You could lock screen, go to the card the browser is, take the snapshot and then go back to the old card, in theory the user wont see anything in the proccess, havent tested it tho.

Code: Select all

on mouseUp
lock screen
go card "browserCard"
local tSnapshot
revBrowserSnapshot tBrowserID, "tSnapshot"
go card "mainCard"
unlock screen
end mouseUp
Knowledge is meant to be shared.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”