Export stack scripts

Alex Tweedly alex at tweedly.net
Tue Oct 12 20:56:08 EDT 2004


At 09:39 13/10/2004 +1000, Ray Stace wrote:

>In the HyperCard tool set there was a function to export all the scripts in
>a stack to a text file.
>Has anyone done likewise for Revolution?

I didn't know Hypercard had one, so I never thought to ask this question :-(

Here's the script I use - a bit rough, but did the job when I needed it ...

on export_scripts
   ask file "Export scripts as:"
   put it into tFilename

   put empty into tVar
   repeat with j = 1 to the number of controls on this stack
     put "...." & the name of control j & cr after tVar
     get the script of control j
     put it  & cr & cr after tVar
   end repeat
   repeat with j = 1 to the number of cards on this  stack
     put "...." & the name of card j & cr after tVar
     get the script of card j
     put it  & cr & cr after tVar
   end repeat
   put "Stack script ..." & cr after tVar
   get the script of this stack
   put it  & cr & cr after tVar

   put tVar into URL ("file:" & tFilename)
   put it & cr after msg

end export_scripts

-- Alex.


More information about the use-livecode mailing list