This will provide some insight into the pleasantly trivial, but still involved, nature of scripting keyframes for a spline object. Currently i only do basic 'POLY' form of spline. read the code here :
github.com/zeffii/AE--afterfx--Mocha-shape-import