There are some awesome developments around #lua scripting in #darktable. Check it out: https://discuss.pixls.us/t/working-with-modules-from-lua-scripts-in-darktable/32934/3?u=paperdigits
Working with modules from Lua scripts in darktable
You can manipulate sliders and comboboxes (and some other widgets and commands) from lua in the same way as you can via the shortcut system, using the darktable.gui.action command. In 4.discuss.pixls.us