Script lua DoApp userdata

We are very aware of how important plugins are for the user community, and that’s why we want to do them right. Unfortunately we didn’t manage to get plugins into the shape that we hoped for the initial version, but we figured that the macro recording functionality and ability to access the command system would be useful enough to some users, so we left this in. You have discovered some other parts of the event model, but the whole interface is incomplete and subject to change.