(PennController.)Header
description
Will evaluate and run sequenceOfCommands at the beginning of each trial created with PennController.
syntax
(PennController.)Header(sequenceOfCommands) ↳ What does (PennController.) mean?
-
sequenceOfCommands:
notes
- Note that
defaultcommands are immediately evaluated (rather than evaluating upon running). As a consequence, anydefaultcommand will only have an effect on PennController trials defined after the Header has been set.
since
beta 0.3example(s)
@
$Header(
$ defaultText
$ .print()
$)
@
@newTrial(
@ newText("test sentence", "The cat is chasing the mouse")
@ ,
@ newText("instructions", "How natural is this sentence?")
@ ,
@ newScale("natural", 5)
@ .slider()
@ .before( newText("left", "Unnatural") )
@ .after( newText("right", "Natural") )
@ .print()
@ .wait()
@)
@
@newTrial(
@ newText("test sentence", "The mouse is being chased by the cat")
@ ,
@ newText("instructions", "How natural is this sentence?")
@ ,
@ newScale("natural", 5)
@ .slider()
@ .before( newText("left", "Unnatural") )
@ .after( newText("right", "Natural") )
@ .print()
@ .wait()
@)
-
Though no
printcommand explicitly appears in the trials themselves, the Text elements will be printed onto the page because the header definesprintas a default command for all Text elements.