how to automatically select a command ?

Hi guys 


, when I opened the menu (with script call)  I can not seem to open with automatic item selection.
I have to click on item selection. !
How to proceed to the automatic open item list thank you


I started in java, here's my script



SceneManager.push(Scene_Item);
Window_ItemCategory.prototype.makeCommandList = function() {
this.addCommand(TextManager.item, 'item');
Window_Command.prototype.processOk.call(this);
};


i try with 

Window_Command.prototype.processOk.call(this);

and also

this.addCommand(TextManager.item, 'item', enabled);





Tank you for help
up☺
up!?
up tanks
Processing ok won't do anything in the above,  because nothing is selected already in your command list.


What you can do is select the command with : this.select (number) index number of command.


Then, you can actually process it by calling process ok.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-automatically-select-a-command.63146/