How to get value from SAP GUI Text field?

How do I save the text value from the Inspector of a SAP GUI string field and save it to a variable?