You can script a GNU screen session from outside screen. Using Vim and Clojure, I show a hack to emulate what I need from Slime.