On 19 November 2014 20:14, Michael Doub <miked...@gmail.com> wrote: > local savebuf, savedcallback, savedobj > On initialize_read @buf, obj > put (the address of buf) into savebuf -- How do I do this? > put obj into savedobj > open file serialport > end initialize_read >
It depends on *where* you want to save it. If you just want to put it into a variable that is held until closeStack then create a global variable and store it into that, e.g.: global gSaveBuf local savebuf, savedcallback, savedobj On initialize_read @buf, obj put (the address of buf) into gSaveBuf -- Saved to a global that, as long as you call the global with the same name in each objects script, will keep the same data. I personally prefer to use globals than referenced variables put obj into savedobj open file serialport end initialize_read Alternatively to save it to the hard drive or other more permanent storage than ram you could use: put (the address of buf) into url("file:" & myFileName) Again, I really hope this helps you out. All the best Sean Cole *Pi Digital Productions Ltd* www.pidigital.co.uk _______________________________________________ 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