Condition Start to use Textbox

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2021.1.2
Standard Standalone? (y/n) If not then what?: Y
What are you trying to achieve?:
I am adding in a short questionnaire (3 questions) at the end of my experiment. The questions are about patterns that one may have recognized during the main part of the code. I am designing it so participants click either Yes or No and the code goes from there. If they click no, it should move on to the next question. This is working no problem. If a participant clicks ‘Yes’, there should popup a textbox that allows them to type in answers. In addition, a text should appear saying ‘Click to continue’ (This isn’t in the picture below, but I assume it will use the same string to start as the textbox, so I plan to add it in later). This is so when a participant is done with typing, they can click this to move on to the next question.

This is how the question looks when run. Ideally, the words should disappear if a participant clicks yes. Then the textbook should appear, with a message at the bottom saying ‘click to continue’, allowing them to move on.

So I have the textbox set to start on a condition, but I keep getting an error message when I first run the code, so it doesn’t start.

What did you try to make it work?:
I tried the following strings in the start condition for textbox:
if_mouse_yes == 1
if_mouse_yes == True

What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.

line 244, in
if textbox.status == NOT_STARTED and asarray(if_mouse_yes == 1):
NameError: name ‘if_mouse_yes’ is not defined

I am attaching the code and the questions used to run the code. If you download and run it, you will need to compile it to Python and change the following. [[Yes]] to [Yes]; and [[No]] to [No]
Any help is greatly appreciated, Thank you

Practice.psyexp (14.2 KB) EndQuestions.xlsx (8.6 KB)

Your mouse is called mouse_Yes not if_mouse_yes so it’s not surprising that you get a not defined error

For your other issue, add a comma after Yes and No in clickable targets. You may need to update to 2021.1.3 for this to work.