How to get value from SAP GUI Text field?

How can I refer to the “text” field from the Inspector for an SAP GUI item and put it into a variable?