I conducted a script that gets the participants displaysize as a value either by asking the participant to type it in a textbox, or by guiding the participant to find it out with the help of a line adjustable to the length of a credit card. For the latter I adapted the "Absolute Sizing"-Script - https://www.millisecond.com/forums/Topic14608.aspx?Keywords=absoulte%20sizing
- and altered it for my purposes.
Now this script is supposed to do the following:
1. If a participant already knows his/her display size, he or she should be able to enter it directly without having to hold a credit card against the screen. After doing this he/she should be directly presented the first part of the actual experiment. => This works so far.
2. The experiment only allows for participants who use a display with at least 10.1 and with no more than 30 inches. If the participant adjusts the line in a way that it is very short or very long, indicating a very big or very small screen, I want the script to show a message with the display size, then a message that it doesn't fit and then stop the experiment after the participant pressing enter.
3. If the length of the line does fit though, I want the script to show a short message which tells the participant the size of his/her display and afterwards, as in point 1, directly present the first part of the actual experiment.
I'm struggling to set up the trial sequence in a way that points 2 and 3 work correctly. Either the experiment always ends after adjusting the line, even if its length is between 400 and 500 pixels (a value I chose for testing so that you don't have to click like crazy) or, if I change the succession of trials in the /block element, the experiment keeps on going even when the line is too short or too long, messing up the image presentation in the actual tasks of the script.
Also I find strange that after adjusting the line you have to confirm, wait for the message with the screen size to disappear and then confirm again. I don't know why it is like this, I would like the script to proceed directly after the message disappears.
I hope you can help me with this. I have a feeling that the issue is in defining this kind of branching with /ontrialend rather than /branch but my feeling didn't lead me to any solution so far. I wouldn't know how to set up the script so that it works correctly.
Attached you'll find the part of the script that is affected (comments are in German).