the code is incredibly complex at this point - which is why doing the dynamic renaming of the variables, buttons, and field names was easiest. Your idea of cloning the card, and naming it uniquely won't work because of all the globals in the stack scripts. They globals are available to every clone of the stack running. References to the fields and buttons, etc would work because each stack would have it's own unique name (assuming that every time I refer to an object, I refer to (button "suchandsuch" on stack "myCLone"). But, I think the only way to ISSOLATE the globals used is to build nested arrays, and due to the complexity of my scripts, my script editing method was easier. Converting all globals to locals won't work either because it will require way too many specific changes in other places on the stack that assume that a global var is available.sturgis wrote:Running as in busy around town doing jobs and such. Came home, went comatose, better now!
After thinking on your solution, without actually having a concrete reason, I think i'd go another direction. Just a feeling of upcoming problems. As jacque mentioned, "me" might be helpful, or behaviors or.. many many options. Mind if I ask exactly what end result you're going for? If all cards must run exactly the same code and in relation to themselves, setting up 1 template card (or substack or whatever) should work fine if you can get your syntax and references straight. Then clone the card, name the card uniquely and turn it loose. You could even save a copy if your card to a property of the stack, then load it up and "paste" it (which gives you a card named "copy of card....." that you can rename.
Can you send post a sample of your old code that you are converting for multiple card/stack use?
However... al that just said.... I save a SA from community, and the cloning does NOT work! There must still be script limits in the Open Source version?? Does anyone know anything about this?