Can text message be put in code?

URL of experiment: https://pavlovia.org/Aparna11/wordsound

Description of the problem:

Hi,
In my experiment I am playing two sounds with 500ms of ISI. and recording the response freom slider. I have unchecked force end of slider and added a key response for trial end. I have nested loop to use one key press (‘r’) for repeat and another key press(‘space’) to continue. I have code component to do this task.
Now I had observatio that without giving slider response the trial used to go to the next with “space”. I again used a code to not to go to the next trial until slider response by adding the following at end routine
if slider_2.markerPos == 1.5 :
if ‘space’ in key_resp.keys:
continueRoutine=False
trials.finished = False
elif ‘space’ in key_resp.keys:
trials.finished = True

Now I need a pop up text message when key ('space") is pressed without slider response.
Can we add text compotent inside the code?

Thank you

I want the text to appear conditionally like when slider respinse is not given and press ‘space’ a flash message should appear on the screen for 200 ms. I have added the following
if slider_2.markerPos == 1.5 :
if ‘space’ in key_resp.keys:
text_7.status = true
text_7 = “Please rate the similarity before proceeding”
text_7.duration = 0.200
continueRoutine=False
trials.finished = False
elif ‘space’ in key_resp.keys:
trials.finished = True

but this gives the erroe message

I also have tried adding text component with start and duration in code… but that didnt work
Can Anyone help me in this

Thank you