Hey thanks very much for your help. I checked the widget debugger for (root -311,child- 7) and it has null for both Actions and Options. So I guess this means the interact option won't work with this widget like you said? I tried this exact code you pasted but it only works upto the point where it right clicks on the widget. The cursor doesn't move onto the ''Smelt X'' option after right clicking. So I used another code to right click and select the ''smelt X' option like this:
Entity Furnace = objects.closest(24009);
Furnace.interact("Smelt");
sleep(random(1000, 2000));
RS2Widget smelter = getWidgets().getWidgetContainingText("Silver");
smelter.interact("Smelt X");
// *****mouse hovers over the widget at this point******
mouse.click(true);
sleep(1000);
if(menu.isOpen()) {
menu.selectAction("Smelt X");
}
mouse.click(false);
But here again, it stops working properly after the mouse right clicks. The cursor doesn't go to the ''Smelt X'' option after right clicking. So I guess the >>> menu.selectAction("Smelt X"); <<<part is not working. Any other way other than the 'smelter.interact("Smelt X")' and 'specifying where to right click' methods ? If i can just get this part working, the whole script will run properly. Cheerio