Millisecond Forums

Triggering trials based on clock time

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

By audiosophy - 3/27/2018

Hi there,

I was wanting to achieve the following: I would like questions in the form of sliders to appear as a function of clock time.

It will be an Ipad-based study in which the tablet is black until a certain time, in which a set of 6 sliders appear. Participants have a certain time to give their answers and the screen goes black again. 

Until the next time set by the clock. 

Is this possible with Inquisit? 
By Dave - 3/28/2018

audiosophy - Wednesday, March 28, 2018
Hi there,

I was wanting to achieve the following: I would like questions in the form of sliders to appear as a function of clock time.

It will be an Ipad-based study in which the tablet is black until a certain time, in which a set of 6 sliders appear. Participants have a certain time to give their answers and the screen goes black again. 

Until the next time set by the clock. 

Is this possible with Inquisit? 

Yes, this should be possible. You can run a <trial> which simply presents a black screen and takes no response. Have that trial /timeout after the desired amount of time and then run your surveypage with the six sliders -- that page also needs a /timeout (the time allowed for participants to respond). After that run the black screen trial again (you can repeat the process as needed and you can also calculate the timeouts dynamically if need be).
By audiosophy - 3/28/2018

Ah sorry should have been more specific. I want a trial to start at say 18:00 and then another one at 18:07 and so forth? That's what I meant by 'clock time'
By audiosophy - 3/28/2018

audiosophy - Wednesday, March 28, 2018
Ah sorry should have been more specific. I want a trial to start at say 18:00 and then another one at 18:07 and so forth? That's what I meant by 'clock time'

Any ideas Dave? Thanks for your previous response btw
By audiosophy - 3/28/2018

audiosophy - Thursday, March 29, 2018
audiosophy - Wednesday, March 28, 2018
Ah sorry should have been more specific. I want a trial to start at say 18:00 and then another one at 18:07 and so forth? That's what I meant by 'clock time'

Any ideas Dave? Thanks for your previous response btw

I was thinking something like the following: 

<trial Blockertrial>
/ ontrialbegin = [values.currenttime = script.currenttime]
/ stimulustimes = [1=Blocker]
/ trialduration = 5000
/ branch = [if (values.currenttime >= 11:56:01) surveypage.sliders]
</trial>

but inquisit is not liking the "11:56:01" part ("Expression contains unknown element or property name".)
By Dave - 3/29/2018

audiosophy - Thursday, March 29, 2018
audiosophy - Thursday, March 29, 2018
audiosophy - Wednesday, March 28, 2018
Ah sorry should have been more specific. I want a trial to start at say 18:00 and then another one at 18:07 and so forth? That's what I meant by 'clock time'

Any ideas Dave? Thanks for your previous response btw

I was thinking something like the following: 

<trial Blockertrial>
/ ontrialbegin = [values.currenttime = script.currenttime]
/ stimulustimes = [1=Blocker]
/ trialduration = 5000
/ branch = [if (values.currenttime >= 11:56:01) surveypage.sliders]
</trial>

but inquisit is not liking the "11:56:01" part ("Expression contains unknown element or property name".)

What currenttime returns is a string, i.e. you'd have to enclose it in double-quotes, but with a string, of course, a "greater than" comparison won't work. This is solvable, and I'll give you a solution in the separate thread you made.