Originally Posted by ssj
Yeah I definitely agree with Haze, I had no idea about this. Thanks for the info, it will work just fine for me.
Is there any documentation about the existing commands?

Now if only I could start/stop a tape from CLI I would be golden (or at least assign a hotkey for that).
I found it by looking into src/emu/luaengine.c, around line 490, there's a list of all defined functions:
http://git.redump.net/mame/tree/src/emu/luaengine.c#n494

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, like pressing "play" or toggling a DIP switch. Or maybe there already is a way which I haven't found yet (initialized somewhere else maybe?)