Free text input using openended and latency


Author
Message
EN
EN
Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)
Group: Forum Members
Posts: 15, Visits: 114
Hello:

I want participants to freely input their thoughts after watching a video. I want them to engage for at least X minutes with the task. Checking some old posts in the forum, I found something that might do it (code adapted below):

https://forums.millisecond.com/Topic17268.aspx

However, when I try to run this code, it returns:

Missing '{'

pointing to the line with the isvalidresponse command.
Since the post is more than 10 years old, I wonder if this code is still valid when using Inquisit 7?
Any help will be greatly appreciated.

EN
--
<text a>
/ items = ("Type something.")
</text>

<text b>
/ items = ("You can move on now.")
</text>

<openended myopenended>
/ stimulustimes = [0=a; 15000=b]
/ isvalidresponse = [openended.myopenended.latency >= 15000]
/ position = (50%, 60%)
/ beginresponsetime = 0
</openended>

<block myblock>
/ trials = [1=myopenended]
</block>

// --------------------------------------
// EXPERIMENT DEFINITION
// --------------------------------------

<expt main>
/blocks = [1=myblock]
</expt>
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: 13K, Visits: 107K
EN - 5/19/2025
Hello:

I want participants to freely input their thoughts after watching a video. I want them to engage for at least X minutes with the task. Checking some old posts in the forum, I found something that might do it (code adapted below):

https://forums.millisecond.com/Topic17268.aspx

However, when I try to run this code, it returns:

Missing '{'

pointing to the line with the isvalidresponse command.
Since the post is more than 10 years old, I wonder if this code is still valid when using Inquisit 7?
Any help will be greatly appreciated.

EN
--
<text a>
/ items = ("Type something.")
</text>

<text b>
/ items = ("You can move on now.")
</text>

<openended myopenended>
/ stimulustimes = [0=a; 15000=b]
/ isvalidresponse = [openended.myopenended.latency >= 15000]
/ position = (50%, 60%)
/ beginresponsetime = 0
</openended>

<block myblock>
/ trials = [1=myopenended]
</block>

// --------------------------------------
// EXPERIMENT DEFINITION
// --------------------------------------

<expt main>
/blocks = [1=myblock]
</expt>

Your code is valid IQX (Inquisit 4 and up) code. It is not valid IQJS (new to Inquisit 7) code, so what you save the file as matters. If you want to continue coding in IQX, save as IQX file. If you want IQJS, the proper syntax is:

<text a>
/ items = ("Type something.")
</text>

<text b>
/ items = ("You can move on now.")
</text>

<openended myOpenended>
/ stimulusTimes = [0=a; 15000=b]
/ isValidResponse = {
    return openended.myOpenended.latency >= 15000
}
/ position = (50%, 60%)
/ beginResponseTime = 0
</openended>

<block myBlock>
/ trials = [1=myOpenended]
</block>

// --------------------------------------
// EXPERIMENT DEFINITION
// --------------------------------------

<expt main>
/blocks = [1=myBlock]
</expt>

EN
EN
Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)Associate Member (104 reputation)
Group: Forum Members
Posts: 15, Visits: 114
Dave - 5/19/2025
EN - 5/19/2025
Hello:

I want participants to freely input their thoughts after watching a video. I want them to engage for at least X minutes with the task. Checking some old posts in the forum, I found something that might do it (code adapted below):

https://forums.millisecond.com/Topic17268.aspx

However, when I try to run this code, it returns:

Missing '{'

pointing to the line with the isvalidresponse command.
Since the post is more than 10 years old, I wonder if this code is still valid when using Inquisit 7?
Any help will be greatly appreciated.

EN
--
<text a>
/ items = ("Type something.")
</text>

<text b>
/ items = ("You can move on now.")
</text>

<openended myopenended>
/ stimulustimes = [0=a; 15000=b]
/ isvalidresponse = [openended.myopenended.latency >= 15000]
/ position = (50%, 60%)
/ beginresponsetime = 0
</openended>

<block myblock>
/ trials = [1=myopenended]
</block>

// --------------------------------------
// EXPERIMENT DEFINITION
// --------------------------------------

<expt main>
/blocks = [1=myblock]
</expt>

Your code is valid IQX (Inquisit 4 and up) code. It is not valid IQJS (new to Inquisit 7) code, so what you save the file as matters. If you want to continue coding in IQX, save as IQX file. If you want IQJS, the proper syntax is:

<text a>
/ items = ("Type something.")
</text>

<text b>
/ items = ("You can move on now.")
</text>

<openended myOpenended>
/ stimulusTimes = [0=a; 15000=b]
/ isValidResponse = {
    return openended.myOpenended.latency >= 15000
}
/ position = (50%, 60%)
/ beginResponseTime = 0
</openended>

<block myBlock>
/ trials = [1=myOpenended]
</block>

// --------------------------------------
// EXPERIMENT DEFINITION
// --------------------------------------

<expt main>
/blocks = [1=myBlock]
</expt>

Thanks! Just like you said, the previous code worked in Inquisit 7 once I re-saved the file as IQX!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search