Process input text as a line of code

Do any tricks exist to make this happen?

For example I may type **ball.x=20; **in a text field. Can I attempt to run that as a line of code somehow?

:rd: