Saving snapshots to files

Wilhelm Sanke sanke at hrz.uni-kassel.de
Fri Mar 12 00:07:11 EST 2004


On Thu, 11 Mar 2004 "A.C.T." <albrecht at act-net.com> wrote:

(snip)

> >>     put char (LastSlash + 1) to Laenge of LongDateiName into Dateiname
> >>    put char 1 to (LastSlash - 1) of LongDateiName into NewDirectory
>
> This smells like "basename" and "dirname" to me. Aren't these standard
> function available in Revolution? I would like to have a list of
> standard-functions listed against their Revolution versions (repeating
> the discussion about "reinventing the wheel"), perhaps this also would
> help those list members that try to port C-code to Transcript?
>
> Your routine to search for slashes might run into trouble if the user
> wanted to include slashes in his filename, it would have to take care of
> the platform (I guess) and eventually even look out for quotation marks
> (as slashes in filenames are allowed everywhere as long as they are
> escaped correctly).
>
> Mit freundlichen Grüßen,
> Marc Albrecht


I was astonished myself when I looked at the rather complicated code  I 
put together some time ago, but did not have time to try out and 
recommend a script that would have been nearer to Ken' needs.

The "ask file" command used in my example returns as "it" something like

"C:/Dokumente und Einstellungen/Besitzer/Desktop/Meta2.6a2/Testimage"

which had to be parsed into directory and short file name using the last 
slash.

Of course, Ken need not use "ask file", if he knows where to store the 
images.

He could just use the "export snapshot" command which can include 
setting the directory and file name.

Beste Gruesse,

Wilhelm Sanke





More information about the use-livecode mailing list