Creating an auto-updating button icon thumbnail image from card snapshot

Bob Sneidar bobs at twft.com
Fri Apr 1 14:18:34 EDT 2011


I wonder if this is because export snapshot puts the stack in memory, along with the first card in the stack? Try it with the second card. 

Bob


On Apr 1, 2011, at 11:05 AM, Richard Gaskin wrote:

> Jacque wrote:
>> While you can take snapshots of objects that aren't open, you can't take
>> them of cards that aren't open. Cards are not objects. I was unable to
>> get a snapshot of another card unless I went there first.
> 
> I didn't know I couldn't do that so I tried it a long time ago and it seemed to work so I've been using it since. :)
> 
> In fact, after reading your post I wondered if it was dependent on having rendered the card during the current session, so I wrote this to test it on a stack I haven't opened in weeks:
> 
> on mouseUp
>  answer file "Select a stack file:"
>  if it is empty then exit to top
>  put it into tStackfile
>  export snapshot from cd 1 of stack tStackFile to \
>    file (specialfolderPath("desktop")&"/myimage.png") as png
> end mouseUp
> 
> Worked a treat.
> 
> --
> Richard Gaskin
> Fourth World
> LiveCode training and consulting: http://www.fourthworld.com
> Webzine for LiveCode developers: http://www.LiveCodeJournal.com
> LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
> 
> _______________________________________________
> 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