Autofile snapshots

Björnke von Gierke bvg at mac.com
Mon Mar 24 14:56:01 EST 2003


> on mouseDown
>   rectSet -- This handler  sets the group's rect to the rect of the 
> button
>   show group "kybdDN"
>   import snapshot from the rect of me
>   -- Is supposed to take a picture of the button in it's 'down' state 
> to use
>   -- as an icon later when he whole process is done.
> end mouseDown

I tested your script and the problem is that you did not read the 
manual ;-)

here is a script that works, inclusive exporting and deleting:
on mouseDown
   hide me
   -- So the button will not cover the group
   rectSet
   show group "kybdDN"
   set the name of the templateImage to "exportMe"
   -- Needed to export it later
   import snapshot from rect ( the rect of me ) of window (the windowID 
of this stack)
   --you must specify a window, or the screen will be used
   --Also note differences in syntax to your code
   export image "exportMe" to file "exported.jpg" as JPEG
  --Exports as jpg into the defautlFolder, beware of Apple resources!
   delete image "exportMe"
   show me
   --Clean up
end mouseDown




More information about the use-livecode mailing list