run stimulus sequence from external file


Author
Message
AnjaK
AnjaK
Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)Esteemed Member (1.8K reputation)
Group: Forum Members
Posts: 12, Visits: 27
Hi all, I was wondering whether it is possible in Inquisit 4 control the stimulus sequence that should be shown via an external file (e.g., .txt, .csv)?

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
AnjaK - Monday, November 07, 2016
Hi all, I was wondering whether it is possible in Inquisit 4 control the stimulus sequence that should be shown via an external file (e.g., .txt, .csv)?

You can use <include> to reference an external text file in an Inquisit script. The contents of that file need to be valid Inquisit syntax. Suppose you have four items A to D, and want to show them in two different sequential orders between-subjects. Let's say those orders are A-B-C-D and the reverse D-C-B-A for the sake of example.

Your "main" script would look like:
----
<block myblock>
/ trials = [1-4 = mytrial]
</block>

<trial mytrial>
/ stimulusframes = [1=mytext]
/ trialduration = 1000
</trial>

<text mytext>
/ items = ("A", "B", "C", "D")
/ select = list.myorder.nextvalue
</text>

//odd group numbers receive 1st order
<include>
/ precondition = [mod(script.groupid, 2) == 1]
/ file = "order1.txt"

</include>

//even group numbers receive 2nd order
<include>
/ precondition = [mod(script.groupid, 2) == 0]
/ file = "order2.txt"

</include>
---

order1.txt would contain the following:
----
//order 1
<list myorder>
/ items = (1,2,3,4)
/ selectionmode = sequence
</list>
----

order2.txt would contain the 2nd (reverse) order:
----
//order 2
<list myorder>
/ items = (4,3,2,1)
/ selectionmode = sequence
</list>
----

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search