Get [live.menu] selected value

kmll's icon

I am able to obtain the selected index from the [live.menu] object but is it possible to get the value of the selected item?

livemenu  = this.patcher.getnamed("sn_livemenu");
post(livemenu.getvalueof());

DRKOSS's icon

you could get the menu items which returns an array and then use the menu index to get the menu text.

var livemenu = this.patcher.getnamed("theMenu");

function msg_int(){
    var a = livemenu.getattr('items');
    var b = livemenu.getvalueof();
    post(a[b*2]);
    }