[Solved]Activate a variable when typing in textfield!

Something like:
if (type letter in the textfield) {

}

would be something along these lines.

if(textfield != ""){

}