MZ How to call battle commands from script

I want to make custom UI for my game that uses this plugin to link buttons to common events http://www.yanfly.moe/wiki/Picture_Common_Events_VisuStella_MZ

To do this I'm trying to get into the BattleManager and Scene_Battle.prototype to execute stuff like escape, select attack command or select skill or item. I have found how to call en escape from a script, how to pass to the next character but I haven't found how to select an action like a skill or item. I have tried using this guide but its not so clear on this aspect.

Anyone knows how to implement this?
What I was looking for is SceneManager._scene._skillWindow or SceneManager._scene._itemWindow. This thread can be closed.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-call-battle-commands-from-script.159024/