| Reference | Downloads | Github

Can I change the height of a text component for the second loop?

My experiment has two trials within a phase, so that at the end of trial 1 the program loops back to the beginning to begin the second trial.

The last routine at the end of both trials is a routine that contains one attention check question. The attention check questions for each trial are completely different from each other in terms of length (i.e, attention check 1 is short but attention check 2 is long) and response required (attention check one requires a keyboard response, attention check 2 requires a mouse click).

I use the same text component to display each attention checker but I use the following code to specify what question I want at each trial.
if Phase1.thisN==0:
P1attentioncheck=“Based on the text below, what is your favorite soda? \n \nThis is a simple question. You don’t need to be a soda connoisseur in order to answer. When given the options to choose your favorite soda, you need to select carrot juice. \n \na. Coca-Cola \nb. Fanta \nc. Ginger Ale \nd. Root Beer \ne. Mountain Dew \nf. Dr. Pepper \ng. Pepsi \nh. Sprite \ni. Carrot Juice \nj. Other”

elif Phase1.thisN==1:
P1attentioncheck=“Pizza Topping\n \n \nMost modern theories of decision making recognize that decisions do not take place in a vacuum. Individual preferences and knowledge, along with situational variables can greatly impact the decision process. To facilitate our research on decision making we are interested in knowing certain factors about you, the decision maker. Specifically, we are interested in whether you actually take the time to read instructions. If not, then some of our manipulations that rely on changes to the instructions will be ineffective. To show that you have read the instructions, ignore the pizza toppings below, as well as the continue button. Instead, simply click on the title at the top of this screen (i.e., “Pizza Topping”) to proceed to the next screen. \n \nWhich of these toppings would you put on your pizza? \n(Click on all that apply) \n \na. Peppers \nb. Bacon \nc. Chicken \nd. Pineapple \ne. Onions \nf. Mushrooms \ng. Pepperoni \nh. Spinach \ni. Ham \nj. Jalapeños \nk. Sausage \nl. Other”

Because the questions differ in length, can I change the letter height of the text component “P1attentioncheck” so that the text is smaller only on the second trial??
Also can I disable the mouse response for the first trial because I only need that component for the second trial? Vice versa for the keyboard responses.

You certainly should be able to with a fairly simple code component.

I’m not sure of the syntax but it might be something like text_2.setSize(fontSize)

Equally for the keyboard and mouse you probably need to have the behaviour dealt with in the code component.