I just found and registered on this forum. In reading up on old posts, I find several asking for support for game controller buttons, and a few asking for sensors within the model that SP can respond to. The first idea that popped in my head was treat in-model sensors as virtual game controller buttons.
That made me think about the Programmable Logic Controller training setups they use in the Mechanical Engineering department at the University where I work: physical table top stuff, motors and gears and microswitches. So, Sketchyphysics is already 'glue' code between Sketchup and the embeddable Newton physics engine. If you're looking for a way to add 'scripting' support in Sketchyphysics, how about 'gluing' in an embeddable PLC engine from any of the existing PLC simulator/training programs? After all, PLCs are essentially real world scripting, and the program you glue in can supply the UI for programing the PLC logic.
I know many PLC simulators are out there, used for teaching PLC programming. I'm not familiar with any of them to offer advice on which are free (open source-wise), or which might have embeddable engines. I just figured gluing in existing code would save a whole bunch of effort, on top of which it would turn Sketchyphysics in to the best PLC training software in the world.