⚠ This website is the beta version of the PCIbex documentation and is still under development. ⚠
Link Search Menu Expand Document

Global commands

Used outside of a trial.


table of contents


AddHost

syntax

AddHost(“URL”)

description

Specifies a host URL to use as a source file for when calling creating a new Audio, Image, or Video element. The "URL" argument must end in "/".

example

click to expand
PennController.ResetPrefix(null)

AddHost("https://files.lab.florianschwarz.net/test/")
AddHost("http://spellout.net/ibexfarm/static/images/")

newTrial(
    newImage("ibex", "ibex.jpg")
        .print()
    ,
    newImage("wait", "https://openclipart.org/image/300px/svg_to_png/23920/Anonymous-Sandglass.png")
        .print()
    ,
    newAudio("sentence", "test.mp3")
        .play()
        .wait()
)

Prints two images and plays one audio file.

  • When loading the "ibex" Image element, PennController sends a request for the file https://files.lab.florianschwarz.net/test/ibex.png.

    If no such file is found, it sends a request for the file http://spellout.net/ibexfarm/static/images/ibex.png.

  • When loading the "wait" image element, PennController sends a request for the file https://openclipart.org/image/300px/svg_to_png/23920/Anonymous-Sandglass.png.
  • When loading the "sentence" Audio element, PennController sends a request for the file https://files.lab.florianschwarz.net/test/test.mp3.

    If no such file is found, it sends a request for the file http://spellout.net/ibexfarm/static/images/test.mp3.

↑ back to top

AddTable

syntax

AddTable(“id”, csv_string)

description

Defines a table to use with PennController.Template. As of PennController beta 0.4, you can directly upload a CSV file to the Resources or chunk_includes folders.

example

click to expand
AddTable( "myTable",             // Name of the table
    "Type,Sentence\n"+           // Column names (mind the \n)
    "practice,Hello world!\n"+   // First row (mind the \n)
    "test,Bye world!"            // Second row
);

Template( "myTable" , row => 
    newTrial(
        newText("type", row.Type)
            .print()
        ,
        newButton("sentence", row.Sentence)
            .print()
            .wait()
    )
);
↑ back to top

CheckPreloaded

syntax

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

DebugOff

syntax

PennController.DebugOff()

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

DownloadRecordingButton

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

EyeTrackerURL

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

FeedItems

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top


GetTable

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example

filter setGroupColumn

↑ back to top

GetURLParameter

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

InitiateRecorder

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

PreloadZip

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

PennController.ResetPrefix

syntax

PennController.ResetPrefix(null)

description

Removes the default global command prefix PennController.

example

click to expand
// example

optional parameters

  • PennController.ResetPrefix(“PREFIX”)
↑ back to top

SendResults

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

Sequence

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

SetCounter

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

Template

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

UploadRecordings

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top

newTrial

syntax

to be filled in

description

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

example

click to expand
// example
↑ back to top