Calling "event commands" from scripts

I was very surprised that I couldn't find an answer to this question, because I thought it would be a pretty common use case.

I recently joined a project using rpgmaker.  The current version makes heavy use of event commands.  This strikes me as an inefficient way to develop.  Having experience in other languages, it seemed slow and awkward to have to select commands from a menu rather than simply type them.

So I looking around trying to see if I could find an easy reference or api on how to change all these lists of event commands to scripts.  I found that event commands do run at the scripting level, but I haven't found an easy-to-use api to run these commands from the script.

I don't see any reason why these commands couldn't be turned into simple functions.  Can anyone help me out?
if you're using VX Ace, there's a thread about it here:

http://forums.rpgmakerweb.com/index.php?/topic/6248-script-call-equivalent-of-events/

However your picture info says you use XP. I didn't try to script when I played around with XP so I don't know
Oh, awesome.  That looks like exactly what I'm looking for.  I'll try it out, and see how well it translates to XP.  Thanks.

I'm still surprised this isn't a standard feature.

EDIT: Huh, I didn't realize until you said that we're using a pretty old version of rpgmaker.  This project may not be worth learning an obsolete skillset for.  Thanks for the help all the same.

For the record, I tried accessing a game variable, and it seemed to work.  The text command didn't, though.
That's for Ace only.
I'm aware of that, thanks.
You can always look at the Game_Interpreter of RMXP. I have been using XP up to now since I started using RM, if you're looking for their equivalents, Game_Interpreter holds everything.

Original thread: https://forums.rpgmakerweb.com/threads/calling-event-commands-from-scripts.25728/