event.getKeys as textbox from code

Hello I’ve been working with a textbox from code. I want to know what’s the correct code to say textbox instead of keys. I have this code on Each Frame for keys, but i want it with the textbox (if there is some value on the textbox) then something happens

if event.getKeys(['space']):
  nPumps=nPumps+1
  if nPumps>maxPumps:
    popped=True
    continueRoutine=False

and i tried the next code but it didn’t worked

if event.gettextbox(['textbox1']):
  nPumps=nPumps+1
  if nPumps>maxPumps:
    popped=True
    continueRoutine=False

is there a correct way to write it?

Hi @vzampa,

YourTextbox.text returns the text currently in YourTextbox.