Counting the number of times someone presses the space bar


Counting the number of times someone presses the space bar

Author
Message
Sannesanne
Sannesanne
New Member
New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)

Group: Forum Members
Posts: 7, Visits: 32
Hey,

Is there an option where inquisit can count the number of times someone presses the spacebar?

Sanne

Dave
Dave
Supreme Being
Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)

Group: Administrators
Posts: 9.5K, Visits: 43K
Sannesanne - Friday, April 26, 2019
Hey,

Is there an option where inquisit can count the number of times someone presses the spacebar?

Sanne

See e.g. https://www.millisecond.com/forums/FindPost22899.aspx

Sannesanne
Sannesanne
New Member
New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)

Group: Forum Members
Posts: 7, Visits: 32
Thank you Smile

Sannesanne
Sannesanne
New Member
New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)

Group: Forum Members
Posts: 7, Visits: 32
I have some more questions and it would be great if you could help me.

I want to have text and images which participants will only view. They don't have to do anything but going to the next page.
The sequence of presentation has to be: image1, text1, image2, text2, image3, text3, image4, text4.
I cannot use /select = sequence,  but I have no idea how I can switch between the two.

Also, I don't know how to upload an image. I used this:

<item pictures1>
/1 =
/2 =
/3 =
/4 =
</item>

<image pictures1>
/ caption=""
/ items=("pictures1")
</image>

But I don't know how to actually refer to an image. I want to make an online game/survey. Would it be possible to share the experiment online?
If so, how would inquisit be able to 'find' the picture when the survey is run on another computer?

Sanne

Dave
Dave
Supreme Being
Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)

Group: Administrators
Posts: 9.5K, Visits: 43K
Sannesanne - Tuesday, April 30, 2019
I have some more questions and it would be great if you could help me.

I want to have text and images which participants will only view. They don't have to do anything but going to the next page.
The sequence of presentation has to be: image1, text1, image2, text2, image3, text3, image4, text4.
I cannot use /select = sequence,  but I have no idea how I can switch between the two.

Also, I don't know how to upload an image. I used this:

<item pictures1>
/1 =
/2 =
/3 =
/4 =
</item>

<image pictures1>
/ caption=""
/ items=("pictures1")
</image>

But I don't know how to actually refer to an image. I want to make an online game/survey. Would it be possible to share the experiment online?
If so, how would inquisit be able to 'find' the picture when the survey is run on another computer?

Sanne

This should be pretty straightforward. Set up two <trial> elements, one to display the "text" page, one to display the "image" page. Run them in sequence.

<block example>
/ trials = [1-4 = sequence(picturetrial, texttrial)]
</block>

<trial picturetrial>
/ stimulusframes = [1=mypicture]
/ validresponse = (57)
</trial>

<trial texttrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<picture mypicture>
/ items = pictureitems
/ select = sequence
</picture>

<item pictureitems>
/ 1 = "image1.jpg"
/ 2 = "image2.jpg"
/ 3 = "image3.jpg"
/ 4 = "image4.jpg"
</item>

<text mytext>
/ items = textitems
/ select = sequence
</text>

<item textitems>
/ 1 = "text 1"
/ 2 = "text 2"
/ 3 = "text 3"
/ 4 = "text 4"
</item>

As for any image files, enter the file names into the <item> element, and upload the files along with the script when you deploy the experiment online.

You'll find basics like this covered in the tutorials, give those a go if you haven't already. https://www.millisecond.com/support/docs/v4/html/tutorials/tutorials.htm

Sannesanne
Sannesanne
New Member
New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)

Group: Forum Members
Posts: 7, Visits: 32
Thank you very much! I tried some tutorials but still I'm a bit confused..

I actually have two conditions.

I made this after your help:

<block experiment1>
/trials = [1-4=sequence(story1, pictures1)]
/ preinstructions = (welcome, instructions1a)
</block>

<block experiment2>
/trials = [1-4=sequence(story2, pictures2)]
/ preinstructions = (welcome, instructions2a)
</block>

I'm not sure how I can randomly assign one of the two experiments to the participants.
I could use

<expt>
/ subjects (1 of 2)

but I don't want to run both blocks.
I read some other threats about the subject but I'm a bit overwhelmed..

Sanne

Dave
Dave
Supreme Being
Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)

Group: Administrators
Posts: 9.5K, Visits: 43K
Sannesanne - Wednesday, May 1, 2019
Thank you very much! I tried some tutorials but still I'm a bit confused..

I actually have two conditions.

I made this after your help:

<block experiment1>
/trials = [1-4=sequence(story1, pictures1)]
/ preinstructions = (welcome, instructions1a)
</block>

<block experiment2>
/trials = [1-4=sequence(story2, pictures2)]
/ preinstructions = (welcome, instructions2a)
</block>

I'm not sure how I can randomly assign one of the two experiments to the participants.
I could use

<expt>
/ subjects (1 of 2)

but I don't want to run both blocks.
I read some other threats about the subject but I'm a bit overwhelmed..

Sanne

You need to set up two <expt> elements in your script. One that runs only the story 1 block, another that only runs the story 2 block. Then assign participants to one of those two <expt>s by either group ID, subject ID or randomly. Since you're planning to run this one the web, I recommed you assign based on group ID and select random generation of group IDs in the web experiment's settings once you upload it.

<expt>
/ subjects = (1 of 2)
/ groupassignment = groupnumber
/ blocks = [1 = experiment1]
</expt>

<expt>
/ subjects = (2 of 2)
/ groupassignment = groupnumber
/ blocks = [1 = experiment2]
</expt>

Sannesanne
Sannesanne
New Member
New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)

Group: Forum Members
Posts: 7, Visits: 32
Thanks a lot Smile

Sannesanne
Sannesanne
New Member
New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)New Member (38 reputation)

Group: Forum Members
Posts: 7, Visits: 32
Hi Dave,

The script is almost done!
It counts how many times a person presses spacebar after 'picking up garbage'. A picture of garbage appears, and when you press spacebar the picture dissappears and a new one will appear in a random time interval. So sometimes the new picture appears immediately, sometimes it takes a couple of seconds. This is done witch counter.

We have included a text element in the corner of the screen which shows the number of times spacebar is pressed.

The problem is, the counter delays the moment the picture is presented, but it also delays the text element which shows the number of times spacebar is pressed. This is because they are both included in the trials.

When playing the game it is distracting that the text with the score also disappears and reappears. Would you know a solution for this, while still counting the number of times someone presses spacebar?

Thank you,

Sanne

Dave
Dave
Supreme Being
Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)Supreme Being (610K reputation)

Group: Administrators
Posts: 9.5K, Visits: 43K
Sannesanne - Tuesday, May 21, 2019
Hi Dave,

The script is almost done!
It counts how many times a person presses spacebar after 'picking up garbage'. A picture of garbage appears, and when you press spacebar the picture dissappears and a new one will appear in a random time interval. So sometimes the new picture appears immediately, sometimes it takes a couple of seconds. This is done witch counter.

We have included a text element in the corner of the screen which shows the number of times spacebar is pressed.

The problem is, the counter delays the moment the picture is presented, but it also delays the text element which shows the number of times spacebar is pressed. This is because they are both included in the trials.

When playing the game it is distracting that the text with the score also disappears and reappears. Would you know a solution for this, while still counting the number of times someone presses spacebar?

Thank you,

Sanne

> The problem is, the counter delays the moment the picture is presented, but it also delays the text element which shows the number of times spacebar is pressed. This is because they are both included in the trials.

I cannot comment on that because you did not share how you actually did this, i.e. the actual code. There is no reason per se why a trial cannot present one stimulus at time X and another stimulus at time Y. One need not delay the other.

> When playing the game it is distracting that the text with the score also disappears and reappears. Would you know a solution for this, while still counting the number of times someone presses spacebar?

Set the <text> element's /erase attribute to false.

GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search