Using a timed Slide Duration (e.g. 5000 ms) on a slide with multiple slide states
ekwing
erikkwing at gmail.com
Mon Feb 4 22:12:45 UTC 2013
OP here. I figured I would update this post with my PST Support
conversation so far. As of now, it remains unresolved: please see below.
Best,
ekwing
_______________________________________
Dear ekwing,
I would be happy to help.
I have attached a modified version of your experiment(.es2) file that I
believe solves this issue.
I have created a variable in the experiment called “endtime”. This variable
is in charge of the time limit for the selection of stimuli. If you open
your Init InLine object, you can see where the “endtime” variable is
created and set.
Then, if you open the DoHitTest InLine object, you can see how the
“endtime” variable is implemented. In this experiment, it is placed into a
simple “If…Then” statement. This “If…Then” statement compares the current
time (clock.read) to the “endtime” variable. If this portion of the
experiment runs longer than the amount of time set by the “endtime”
variable, then the experiment is set to go to the “EndStimulus” label.
Please let me know if you have any other questions after taking a look at
this sample experiment.
Sincerely,
################
Technical Consultant
*From ekwing on 2/4/2013 4:59:00 PM* Hi #######,
Thank you for helping me with this issue, however, I believe my problem
remains unresolved.
Simply running and testing the sample experiment you attached shows that
the slide still does not advance after 5 seconds regardless of the
selections made; that is, it persists to advance 5 seconds after a
selection is made on the screen, not after the slide initially comes on.
I'll try to phrase my issue another way. The main problem lies in the
"Highlight Selection" inline code, where there is a large "if" statement
that concludes with "Goto RedoTrial". The if statement codes for the
selection of a stimulus, and then goes to Redotrial, allowing for the if
statement to be activated again (i.e. allowing for the selection of the
next stimulus). This process, however, resets the slide, and therefore also
resets the slide timer, making the endtime variable you created no better
than the slide duration set in the slide properties of the stimulus slide.
What I need is for the slide to advance after 5 seconds from initially
coming on the screen, not 5 seconds after the participant has made their
latest selection. This would involve a work around for the "Goto RedoTrial"
part of the code; I need something that allows the participant to make all
3 ratings on the same screen without the slide resetting (i.e. going to
RedoTrial).
Additionally, in the version of the study you provided, you commented out
the following code:
'If the subject did not click on a box or the SlideText used to exit the
trial,
'then loop back to the Stimulus so the subject can make another selection.
'If strHit = "Question" OR strHit = "State1" OR strHit = "State2" OR strHit
= "" Then
' Goto RedoTrial
This code is necessary for the study as well; if it is not there, the study
will crash if the slide is clicked on anywhere but the text boxes. As you
can see, this code involves "Goto Retrial" as well, and so it would have to
be modified.
Please feel free to email me (###########) if any further clarification is
necessary or if that would be a quicker form of communication. I sincerely
appreciate your help and apologize if my descriptions of the issue have not
been as clear as they could be.
Thanks again,
ekwing
On Thursday, January 24, 2013 11:14:54 AM UTC-7, ekwing wrote:
>
> Hi everyone,
>
> I made a related post about this issue a couple weeks ago (which saw no
> activity), however I have progressed since then and wanted to make a new
> post with the updated information.
>
> The goal of my current project is to create a slide which contains 3
> rating scales and allows participants to use the mouse to select one rating
> on each scale before advancing after 5 seconds (regardless of whether all
> ratings were made or not). The project is currently set up so that each
> scale point is represented by an individual text box which becomes
> activated (i.e. turns and remains a different color and logs data) when
> clicked.
>
> Currently, everything about the slide is functional, with the exception of
> advancing after 5 seconds. Because, I believe, there is a change in slide
> state when a text box becomes "activated" (the participant makes a
> selection), the 5 second slide duration resets every time a participant
> makes a rating scale selection. This, in turn, results in the slide
> advancing 5 seconds after the participant makes their final selection,
> rather than advancing 5 seconds after the slide comes on the screen as
> desired.
>
> As a secondary question, I was wondering if anyone with experience with
> slide states had any problems with data collection (E-Prime logging and
> Physio) or if you can foresee any problems I may run into using this
> technique.
>
> I've had problems attaching files in the past, but will post the relevant
> inline code that follows the stimulus slide below. Also, the stimulus
> slide properties currently have Duration set to 5000ms, Timing Mode
> is Cumulative, and a Mouse as a registered device with the following
> properties:
>
> Allowable: 1
> Time limit: (Same as duration)
> End Action: Terminate
>
> Thanks for any help you can provide,
> ekwing
>
> *DOHIT TEST*
> 'Designate "theState" as the Default Slide State, which is the
> 'current ActiveState on the Slide object "Stimulus".
> Dim theState as SlideState
> Set theState = Stimulus.States("Default")
>
> Dim strHit As String
> Dim theMouseResponseData As MouseResponseData
>
> 'Was there a response?
> If Stimulus.InputMasks.Responses.Count < 1 Then
>
> Set theMouseResponseData = Nothing
>
> End If
>
> 'Was there a response?
> If Stimulus.InputMasks.Responses.Count = 1 Then
>
> 'Get the mouse response.
> Set theMouseResponseData =
> CMouseResponseData(Stimulus.InputMasks.Responses(1))
>
> 'Determine name of SlideText object at mouse click coordinates. Assign
> that value to
> 'strHit.
> strHit = theState.HitTest(theMouseResponseData.CursorX,
> theMouseResponseData.CursorY)
>
> ' Else
> ' Set theMouseResponseData = Nothing
>
> End If
>
> 'Was there a response?
> If Stimulus.InputMasks.Responses.Count = 2 Then
>
> 'Get the mouse response.
> Set theMouseResponseData =
> CMouseResponseData(Stimulus.InputMasks.Responses(2))
>
> 'Determine name of SlideText object at mouse click coordinates. Assign
> that value to
> 'strHit.
> strHit = theState.HitTest(theMouseResponseData.CursorX,
> theMouseResponseData.CursorY)
>
> ' Else
> ' Set theMouseResponseData = Nothing
>
> End If
>
> 'Was there a response?
> If Stimulus.InputMasks.Responses.Count = 3 Then
>
> 'Get the mouse response.
> Set theMouseResponseData =
> CMouseResponseData(Stimulus.InputMasks.Responses(3))
>
> 'Determine name of SlideText object at mouse click coordinates. Assign
> that value to
> 'strHit.
> strHit = theState.HitTest(theMouseResponseData.CursorX,
> theMouseResponseData.CursorY)
>
> ' Else
> ' Set theMouseResponseData = Nothing
>
> End If
>
> 'If the subject did not click on a box or the SlideText used to exit the
> trial,
> 'then loop back to the Stimulus so the subject can make another selection.
> 'If strHit = "Question" OR strHit = "State1" OR strHit = "State2" OR
> strHit = "" Then
> ' Goto RedoTrial
> 'End If
>
> 'Release references
> 'Set theMouseResponseData = Nothing
>
> *HIGHLIGHT SELECTION*
> 'Declare SlideText variable used for modifying box properties.
> Dim xSlide As SlideText
>
> 'Declare string for holding the name of the Row the box clicked is in.
> Dim strRow As String
>
> 'Declare variables for storing subject's final rating.
> Dim intRating1 As Integer, intRating2 As Integer, intRating3 As Integer
>
> If Stimulus.InputMasks.Responses.Count > 0 Then
>
> 'Gain access to selected box.
> Set xSlide = CSlideText(Stimulus.States.Item("Default").Objects(strHit))
>
> 'Store the name of the row the box was clicked in. This Mid function
> will return
> 'the first 4 characters of strHit (the name of the box) and store them
> in strRow
> strRow = Mid(strHit, 1, 4)
> Select Case strRow
> Case "Row1"
>
> 'If a box in this row has not yet been selected...
> If R1 = False Then
>
> 'Highlight this box and set R1 to true (a box in this row has now been
> selected)
> xSlide.BackColor = CColor("yellow")
> R1 = True
>
> 'Return the final character in strHit (the digit) as subject's rating for
> this
> 'row.
> intRating1 = CInt(Mid(strHit, 5, 1))
>
> 'If a box in this row has been selected...
> Else
>
> 'If this is the box that has already been selected, reset the color and
> set R1
> 'to false (a box in this row has not been selected). Otherwise, do nothing.
> If xSlide.BackColor = CColor("yellow") Then
> xSlide.BackColor = CColor("green")
> R1 = False
> End If
>
> End If
>
> Case "Row2"
>
> 'If a box in this row has not yet been selected...
> If R2 = False Then
>
> 'Highlight this box and set R2 to true (a box in this row has now been
> selected)
> xSlide.BackColor = CColor("yellow")
> R2 = True
>
> 'Return the final character in strHit (the digit) as subject's rating for
> this
> 'row.
> intRating2 = CInt(Mid(strHit, 5, 1))
>
> 'If a box in this row has been selected...
> Else
>
> 'If this is the box that has already been selected, reset the color and
> set R2
> 'to false (a box in this row has not been selected). Otherwise, do nothing.
> If xSlide.BackColor = CColor("yellow") Then
> xSlide.BackColor = CColor("green")
> R2 = False
> End If
>
> End If
>
>
> Case "Row3"
>
> 'If a box in this row has not yet been selected...
> If R3 = False Then
>
> 'Highlight this box and set R3 to true (a box in this row has now been
> selected)
> xSlide.BackColor = CColor("yellow")
> R3 = True
>
> 'Return the final character in strHit (the digit) as subject's rating for
> this
> 'row.
> intRating3 = CInt(Mid(strHit, 5, 1))
>
> 'If a box in this row has been selected...
> Else
>
> 'If this is the box that has already been selected, reset the color and
> set R3
> 'to false (a box in this row has not been selected). Otherwise, do nothing.
> If xSlide.BackColor = CColor("yellow") Then
> xSlide.BackColor = CColor("green")
> R3 = False
> End If
>
> End If
> End Select
>
> Goto RedoTrial
>
> ' Else
> 'If R1 = False Or R2 = False OR R3 = False Then
> ' Goto EndStimulus
>
> ' End If
>
> End If
>
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/e-prime/-/niZqw7lAFroJ.
For more options, visit https://groups.google.com/groups/opt_out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20130204/c4c2b2bc/attachment.htm>
More information about the Eprime
mailing list