On 19/08/15 23:03, Richard Gaskin wrote:
Richmond wrote:
Why does this script NOT work in a small stack?

on mouseUp
    palette stack "AUTOSAVE"
    put the short name of the topStack into TSTAK
    put TSTAK & " / " &  the time & " / " & the date into TSTAKN
    put TSTAKN into fld "TSTAKN"
    save the topstack as TSTAKN
end mouseUp

Does it work on a large stack?

By "small stack' I meant that that script is contained in a button on a palettised stack, and is meant to save another stack.
It does put the data into the fld "TSTAKN" but does NOT save the top stack.

The idea is to convert this code into the cardStack of a palette with a time interval so it serves as a version saver.

But any sort of script to save a stack under a different name seems problematic:

save stack "HEX rotate" as "Granny goes gay"

doesn't work either.


It might be problematic with a stack of any size since the date returns a value that contains "/", which is used as a path delimiter on OS X and Linux.

What does "the result" give you after the save command?

"can't open stack file"


If instead of changing the path of the current stack what you're looking to do is make a copy of it to a new location, I'd make a copy of the file itself and leave the in-memory stack alone.

--
 Richard Gaskin

Richmond.

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to