You can put multiple messages in there if you wanna do it like that,
if (dialogues.selectOption("Take to sawmill: 26 x Mahogany logs", "Take to sawmill: 26 x Teak logs")) {}
and you can just improve this piece of code like this: (widget ids can change once in a while if new things get added or UI changes)
RS2Widget toSawmillWidget = getWidgets().getWidgetContainingText(219, "Take to sawmill:");
if (toSawmillWidget != null && toSawmillWidget.isVisible()) {
// Either interact
if(toSawmillWidget.interact()){
}
//OR do a keyboard press, usually it's alway on 1 I assume?
if(getKeyboard().typeKey('1')){
}
}else{
useLogsOnButler(logName);
}