As an example, here's the code I fiddled with a while back that passes an existing kix object into the scriptcontrol so you can do stuff with it.

http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=201251#Post201251