enquiry about sending log events to Studio during the presentation of a stimulus
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



enquiry about sending log events to Studio... Expand / Collapse
Author
Message
Posted 3/26/2010 6:13:01 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 3/29/2012 3:20:08 AM
Posts: 3, Visits: 16
Hi,

I was wondering whether it is possible to send log events to Tobii Studio in a recurrent way, while presenting a stimulus. This would be to facilitate the chopping up into scenes (using the automatic scene generation in studio, from the events sent directly by e-prime) and thus the visualization of the data in Studio.
The events for example would be sent every 1 or 10 seconds (user defined), and could then be used to divide the recording in Studio into scenes of that length, automatically.


Thank you for any input you might have!

Best regards,
Leopoldine Brand

Post #4189
Posted 3/27/2010 3:23:39 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 10/20/2010 4:42:14 PM
Posts: 23, Visits: 78
I would take a look at the process responses sample that PST offers on their site (attached). Basically it is a way to run script while an object/stimulus is on screen. You set the object up with a 0 duration and set the end action to none and then in an inline you have a loop that runs until whatever criterion you want (response, specific amount of time). For this, you would just have script inside the loop to run CVSendLogEvent calls.

This would be the script for sending a log event every second while the Stimulus object is on the screen:

Dim nStartTime As Long
Dim nNextTime As Long
Dim nCount As Long

nStartTime = Clock.Read
nNextTime = nStartTime + 1000

Do While Stimulus.InputMasks.IsPending()

If Clock.Read >= nNextTime And nNextTime = (nStartTime + 1000) Then
nCount = nCount + 1
strSceneName = "SceneStart Scene" & nCount

CVSendLogEvent(c, strSceneName)

nNextTime = nNextTime + 1000
ElseIf Clock.Read >= nNextTime
Dim strSceneName As String
strSceneName = "SceneStop Scene" & nCount

CVSendLogEvent(c, strSceneName)

nCount = nCount + 1
strSceneName = "SceneStart Scene" & nCount

CVSendLogEvent(c, strSceneName)

nNextTime = nNextTime + 1000
End If
Loop

This just uses a counter to name each scene Scene1, Scene2, Scene3. The two If statements are to make sure that on the first time, since there is no active scene, a SceneStop event is not sent. Otherwise, we send a SceneStop (current scene) event and then a SceneStart (next scene) event.

This works best if there is only one object in the experiment that you want to send multiple events for. If there are multiple objects, unfortunately you will have to use this script on all of them, which can become a pain.


  Post Attachments 
ProcessResponsesTemplate.es (3 views, 22.22 KB)
Post #4195
Posted 3/29/2010 4:26:51 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 3/29/2012 3:20:08 AM
Posts: 3, Visits: 16
Hi,

Thank you very much for the quick and detailed answer! I didn't know one could run a script in parallel, but I will try it out immediately!


Best regards,
Leopoldine
Post #4196
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 3:15am

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0.156. 11 queries. Compression Disabled.
 
Privacy | Terms of Use | Terms and Conditions | Legal Trademarks | Authorized Use | Quality Policy
Copyright 2012 Psychology Software Tools, Inc. All Rights Reserved
Email: Info@pstnet.com | Telephone: 412.449.0078 | Fax: 412.449.0079