Time for action – creating a data save stack
We're going to be making a copy of a stack, but only if a copy of the stack doesn't already exist. LiveCode has a nice "if there is a…" function, which was made for times like this!
Firstly we will create the stacks we'll need.
Start a new Mainstack, with a name of
LaunchStack
. Save it somewhere other than your computer's Documents folder.Start another new Mainstack, with a name of
AppStack
. Save it next to the first stack.Place something onto each stack's card, so you can easily recognize when you're in that stack. For example, drag a button onto the card of the
LaunchStack
stack and name it in a way that makes it very easy to tell where you are. Do the same for theAppStack
stack.Put this
openStack
handler into the stack script ofLaunchStack
:on openStack set the defaultFolder to specialFolderPath("Documents") if there is not a file "AppStack.livecode" then put the filename of this stack into masterfile set the itemdelimiter...