Page 1 of 1

Save Card Window as Graphic

Posted: Mon Apr 08, 2013 11:16 pm
by trailboss
I'm putting this into the basic area because I've looked through the forum and can't get something basic to work.

I simply want to save a RunRev PAGE/CARD as a graphic.
I have used snapshot to do some other things, but I'm spending forever getting this simple thing done.

FROM DOCUMENTATION:
local tSnapshot
revBrowserSnapshot sBrowserId, "tSnapshot"
set the imageData of image "Browser Thumbnail" to tSnapshot

It doesn't work for me no how and no way I cook it.

I've tried lots of other ways too.

I guess I don't know what I'm doing. What is a simple way to make a snapshot of the card so I can save it as a jpg, png, gif, maybe even pdf?

Thanks for any help,
Tom

Re: Save Card Window as Graphic

Posted: Mon Apr 08, 2013 11:32 pm
by Simon
Hi Tom,
Just checking but is your request specifically for the browser object or any card/object?
Yes, I can see you wrote "revBrowserSnapshot" but I thought I'd ask to be sure.

Simon

Re: Save Card Window as Graphic

Posted: Mon Apr 08, 2013 11:48 pm
by trailboss
I just want to save the card screen as a graphic. Like a screenshot of what's on the card without the menu or anything.

(The documentation read: "The revBrowserSnapshot command takes a snapshot of the page currently being displayed in the specified browser object.") So I tried it.

I tried other ways than the above, but it should be rather simple. I'm just not getting lucky with this.
Or I would be happy to know how to snapshot a particular area of the screen -- like ALL of it. I have indeed been able to do that with a specified part of a field (but not the card itself). Like this:
import snapshot from rectangle 0,0,228,198 of field "mydata" of this card

But again, I just want to save the card as a graphic.

Tom

Re: Save Card Window as Graphic

Posted: Mon Apr 08, 2013 11:51 pm
by sturgis
try
import snapshot from card "cardname" hopefully that will give you the results you want.

Re: Save Card Window as Graphic

Posted: Mon Apr 08, 2013 11:58 pm
by Simon
here as well:

Code: Select all

on mouseUp
   set the defaultFolder to specialFolderPath("desktop")
   export snapshot from this cd to file "snap.jpg" as JPEG
end mouseUp
Simon

Re: Save Card Window as Graphic

Posted: Tue Apr 09, 2013 12:04 am
by sturgis
oh do. Yep export to9 a file. Import if you just want it as part of the stack. Me and reading haven't been on friendly terms lately.

Re: Save Card Window as Graphic

Posted: Tue Apr 09, 2013 12:40 am
by trailboss
This works perfectly and is as simple as I thought it was. Thanks so very much.

Re: Save Card Window as Graphic

Posted: Tue Apr 09, 2013 12:44 am
by Simon
Glad it worked. :D
My first reply was for specifically addressing a revBrowserSnapshot question.
revBrowserSnapshot is specific to a browser in LC (like an IE or Safari browser(Browser Sampler.rev)) to take a snapshot of the web page. "export snapshot" Doesn't work on a browser object.

Simon

Re: Save Card Window as Graphic

Posted: Tue Apr 09, 2013 12:55 am
by trailboss
I see. Well, one day I will compile a "toolbox" of fun buttons that do any easy thing. Simple scripts like the one you gave me instead of the kind of hard to understand stuff in some of the documentation.

Tom