I need to get a string from the user + do funky things with it.

This is like inverse of spawn "xmessage ... "

Dmenu does not "work" because I don't want to immediately run the program -- I need xmonad to get the string + do things with it + control how the program is started.

How can I do this?

Thanks!