Back
Login
Register
Login
Register
Millisecond Forums
Home
»
Millisecond Forums
»
Inquisit 4
»
Count Button Presses in Trial with Fixed Duration
Count Button Presses in Trial with Fixed Duration
Post Reply
Like
67
Count Button Presses in Trial with Fixed Duration
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Pete
Pete
posted 7 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 2,
Visits: 6
Thank you very much! Works perfectly!
Reply
Like
71
Dave
Dave
posted 7 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 104K
+
x
Pete - Monday, November 20, 2017
Hi everyone,
I'm trying to create a trial lasting 3 min in which participants have to press the spacebar every time they come up with an idea. I would like to count how many times the participant presses the spacebar and if possible at what exact points in time during the 3 min interval the presses took place.
I would really appreciate any help as I seem to be stuck.
You can achieve this using /isvalidresponse:
<block ideablock>
/ trials = [1=ideatrial]
</block>
<trial ideatrial>
/ stimulusframes = [1=ideatext]
/ validresponse = (57)
/ isvalidresponse = [if (trial.ideatrial.response == 57) {values.spacebarcount +=1; values.keypresstimes = concat(concat(values.keypresstimes, trial.ideatrial.latency), ";"); false}]
/ timeout = 30000
</trial>
<values>
/ spacebarcount = 0
/ keypresstimes = ""
</values>
<text ideatext>
/ items = ("Press the spacebar whenever you have an idea.")
</text>
<data>
/ columns = [date time subject group blocknum blockcode trialnum trialcode stimulusitem response latency
values.spacebarcount values.keypresstimes]
/ separatefiles = true
</data>
You'll find the total number of spacebar presses logged in values.spacebarcount; you'll find a list of the exact times when the presses occurred in values.keypresstimes (in milliseconds, measured from the start of the trial).
Reply
Like
63
Pete
Pete
posted 7 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 2,
Visits: 6
Hi everyone,
I'm trying to create a trial lasting 3 min in which participants have to press the spacebar every time they come up with an idea. I would like to count how many times the participant presses the spacebar and if possible at what exact points in time during the 3 min interval the presses took place.
I would really appreciate any help as I seem to be stuck.
Reply
Like
67
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
67
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Facebook
Explore
Messages
Mentions
Search