in reply to User input at runtime

I'm not entirely sure what part you need help with. Could you post the code that you have (working or not) and be a little more specific?

If you're starting from scratch, the following may help:

That should get you started. Good luck.

Update: Added s///