Navigation stuff goes here


Command groups: display text

These commands are used to display a chunk of text to the participant. The text is shown to the participant until they click on an 'OK' button, at which point the text is removed from the display and the script continues. These blocks of text are not usually used as stimuli since you have no control over the size and formatting of the text, or how the script continues after they're shown, but they're useful if you need to give the participant a paragraph or two of instructions at some point in the procedings.

Displaying text from a textblock

Rather than include your text in a procedure, you can place textblocks in your script and put your text in them. This is the preferred method of supplying text for your script to display. It helps to keep your script neat, and allows you to change text while staying away from the procedures. Each textblock has a name and contents. You can have as many textblocks as you want, as long as each one has a different name. Below you can see an example of a textblock and how to display the text in it.

proc setOfTrials … display text from textblock TrialInstructions … end proc textblock TrialInstructions During the next section begins you will see a series of bubbles on the display. If the bubble is red please click on the bubble itself. If the bubble is green, please click on the word 'NO' instead. You will see a series of 20 bubbles. Click the 'OK' button when you're ready to start. end textblock

Displaying text from a variable

Sometimes you need to be able to change the text you display in flexible ways, or to have your script generate different text depending on certain conditions or actions of your participant. For this purpose PsyScript has the display text from variable command.

proc setOfTrials declare $varInstructions … set $varInstructions to Please click on the red dog. display text from variable $varInstructions … end proc

Commands

display text from textblock name

Displays the text supplied in that textblock, then waits for the participant to click the 'OK' button before continuing.

display text from textblock InstructionsForCondition2
display text from textblock ThankYouWereDone


display text from variable value

Displays the text in that variable, then waits for the participant to click the 'OK' button before continuing.

display text from variable $varThisStepsInstructions
display text from variable $varHowLongDoTheyHave


Technical notes

None.

See also