Episode 2

Copy and paste text to your Inquisit

>>>Episode 2<<< basic_text_presentation



<text hello>
/items = ("Hello World I am coding!")
/txcolor = (0, 100, 255)
/fontstyle = ("Arial", 50pt, true)
</text>

The text is a text element named hello - text element defines a set of text stimuli and determines how items are selected 
and displayed on the screen.
The item is one of attributes - attribute changes some properties of elements, in this case attribute "item" defines the items 
contained in the stimulus set. Here we define text element called hello with only one item Hello World, we use " " to signal that hello world is a text.
To see all possible attributes which you can use to specify text element, click beetwen text tags and press F1

Elements are basic "bricks", you can combine them to build experiment 
and attributes allow you to modify these "bricks" according to your needs.

The clue in Inquisit programming is to know what bricks (elements) you have in Inquisit and how you can shape them to build desired experiment.

Now we know how to create basic text, but how to present it on the screen?

We need another element, called trial, to do this.

<trial my_trial>
/stimulustimes = [600=hello]
/timeout = 1000
</trial>
The trial element controls the timing and the content of stimulus presentation.
The stimulus' time attribute specifies the stimulus presentation sequence for a trial in terms of time in milliseconds.
The timeout attribute specifies a time deadline in milliseconds for a trial
We decide to have 1000 ms long trial and present stimulus called hello from 600ms to the end of trial, so by 400ms

Now click on trial and then press blue arrow "Run the selected element" to see how trial my_trial works.


Usually we need more than one trial in experiment, so we need to create block of trials.

<block my_block>
/trials = [1=my_trial;2=my_trial]
</block>
The block element defines a sequence of trials to be run.
The trials attribute specifies the sequence of trials to be run in the block.
We decide to present trial called my_trial two times in a row 

As previously, press blue arrow to check how my_block works.

We usually use several blocks of trials in one experiment, so we need to create a sequence of blocks. 


<expt my_experiment>
/blocks = [1=my_block;2=my_block]

</expt>

The expt element defines a sequence of blocks to be run.
The blocks attribute specifies the sequence of blocks to run in the experiment.
We decide to present block called my_block two times in a row (reminder: each block called my_block consisted of two trials called my_trial)

When you have defined stimulus, trials, blocks and expt element, you have all you need to run script.  
Thus, now you can press green arrow to run completed script.


This is really simple script - it presents only 4 stimulus, but it illustrates basic idea of binding elements together in Inquisit programming language.
First, you need to create some stimulus (text Hello word in this case, but you can use picture, video, sound).
Then, in trial element you define how to present stimulus in a single trial.
Next, in a block element you define how to group stimulus in a sequence of trials.
Finally, in a expt element you decide how to present sequences of blocks.

Using predefined elements and their attributes, you can communicate with computer and ask it to do something for you.

>>> To learn more about each element, click on element and press F1 
>>> To see what each element does alone, click on element and then click blue arrow in a toolbar (applied only to some elements)
>>> To see how a whole script works, press green arrow in a toolbar

Brak komentarzy:

Prześlij komentarz

Uwaga: tylko uczestnik tego bloga może przesyłać komentarze.