There are not many functions in there (yet) but it would probably be possible to add a generic function to trigger any sort of input on any device currently running(...)
There's partly that. The array ioport is auto-filled on startup with objects representing named ports (name as the key). On these objects you can call write to set the input value. It only works for digital inputs though.
For instance here's how I fire a ball in afm: ioport["Trough ball 1"]:write(0) emu.wait(0.05) ioport["Trough eject"]:write(1) emu.wait(0.05) ioport["Trough eject"]:write(0) emu.wait(0.05) ioport["Trough ball 1"]:write(1) ioport[string.format("Trough ball %d", ball_out)]:write(0) emu.wait(0.05) ioport["Shooter lane"]:write(1)