The script of an object is a property of that object. It is not a container. I'll explain.
If you want to change the data in a container, like a field or a variable, you do things like "put" data into (or after, whatever) that container. But if you want to change the data in a script, being a property, you first "get" the data, then process it, then set it: get the script of stack "yourStack" put "on mouseUp" & return & "beep 3" & return & "end mouseUp" & return before it set the script of stack "yourStack" to it This can be done under program control, even, creating a sort of self-modifying code. But at least it works in a straightforward way as in the example. Craig Newman -----Original Message----- From: Cal Horner <calhor...@xtra.co.nz> To: use-livecode <use-livecode@lists.runrev.com> Sent: Tue, Feb 28, 2012 11:01 pm Subject: Script Editor Conundrum Over the years I have created a lot of plug-ins. Some templates are for the interface and many templates are for scripts. An example would be the ask/answer dialog template. I have always cut and pasted the scripts into the script editor. Simply because I didn't have the knowledge(expertise) to insert the code by program My question is can I place the generated code into the script editor, by program. If it is possible, How is it done. Any examples? Thanks Cal _______________________________________________ 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 _______________________________________________ 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