screen captures

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
churchken
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 66
Joined: Sun Apr 15, 2007 2:54 pm
Location: Albuquerque, NM USA

screen captures

Post by churchken » Tue May 22, 2007 4:50 pm

Hi,

Is there a way using REV commands to capture a specific screen area (or designated window) and put it into an image?

Thanks,
Ken

Klaus
Posts: 13878
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Post by Klaus » Tue May 22, 2007 5:21 pm

Hi Ken,

sure it is :-)

Check the docs for "import snapshot..."


Best from germany

Klaus

churchken
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 66
Joined: Sun Apr 15, 2007 2:54 pm
Location: Albuquerque, NM USA

thanks from New Mexico

Post by churchken » Tue May 22, 2007 6:51 pm

Klaus,

Many thanks for the spot on reference.

Regards,
Ken

churchken
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 66
Joined: Sun Apr 15, 2007 2:54 pm
Location: Albuquerque, NM USA

location of screen snapshot rectangle

Post by churchken » Wed May 23, 2007 2:58 pm

Hi,

Using the "export snapshot" command, an area of the screen is sucessfully exported to an image file.

Now, is there a way to capture the rectangle x & y values of the capture area so that the same area may be captured at timed intervals?

I've tried the clickLoc and mouseLoc commands, but don't seem to actually "catch" the precise area that was defined in the "export snapshot" process.

Thanks in advance for any pointers.
Ken

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sat May 26, 2007 1:47 am

Hi ken,

What exactly have you tried so far?

You can import/export a snapshot from the rectangle (or a part of it) of any object. It is all explained in the docs. For example:

export snapshot from rect 100,100,200,200 of this card to myVar as PNG

If you need the user to select a part of the card, you should give sufficient visual feedback. For example, set the topleft of an object to the mouseLoc on mouseDown, followed by a repeat loop which sets the bottomright of the object to the mouseLoc. When the mouse is up, put the rect of the object into a variable and use that to export from.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”