Further work on selection script

So far dirt code in the plugin but seems to work as a proof of concept

Signed-off-by: Marcin Wiatr <marcin@qi-interactive.com>