Problem with hit Test
haslinger.hans11 at gmail.com
haslinger.hans11 at gmail.com
Tue Jan 28 14:38:08 UTC 2014
Hallo again
I have tried it once again.
Duration was set to "infinite" not 0 ( so embarrassing...)
It's working now.
For the RT-measure I used the following code after the hitTest:
Dim Reaction as Long
Reaction = RecognitionSlide.RTTime - SoundOut1.OnsetTime
c.SetAttrib "RecognitionReaction", Reaction
because when I used "RecognitionSlide.OnsetTime" instead of "SoundOut1.OnsetTime"
it led to the same value as "RecognitionSlide.RT".
This code seems to produce the right RT now.
It seems as if i solved my problem now.
I just tried it in a seperate es.-file and have to check if it still
works in my actual Experiment.
But so far it is looking good.
Thank you very much for all your help, Paul.
Best regards
Hans
P.S. I kept my goto restart design.
"Never Change a winning team" or working program (...as I hope...) ;-)
Am Dienstag, 28. Januar 2014 11:25:00 UTC+1 schrieb haslinge... at gmail.com:
> Hi Paul
>
> I will try your SoundOut solution again. Maybe I got something wrong.
>
>
> My design looks like that:
>
> TaskList
> restart (Label)
> InstructionRecognition (Slide)
> InLine
> RecognitionList
> RecognitionTrialProc
> restart (Label)
> RecognitionSlide
> InLine
>
> The Stimulus-Images, target - Images and Soundfiles are listed in
> "RecognitionList".
>
>
> But the again: I would stay away from goto-label constructs and use a
>> separate List object
>
>
> Might the GoTo-solution cause any problems additionaly to the
> restarting-problem or is the List-Loop method just a cleaner solution?
> My design is a little larger, because i have more other tasks like
> "Recognition", so it would be a bit more work.
>
>
>
> The easiest way (in my naive imagination) would be to make everything else
> except of the target Images impossible to click on.
> Is something like that possible?
>
>
>
> Am Montag, 27. Januar 2014 22:23:44 UTC+1 schrieb Paul Groot:
>
>> Hi Hans,
>>
>> Perhaps I'm mixing things up, but if I understand your design correctly,
>> it should be possible to move the sound from the Stimulus slide to a
>> separate SoundOut object just before the Stimulus Slide, without disturbing
>> anything. (Ignoring the restart label for now.) If the duration of the
>> SoundOut object is set to zero, the onset of the sound should (almost)
>> coincide with the onset of the image. (If the onset times of the stimuli
>> are critical, you will have to measure sound and display onsets using
>> suitable instruments and fine-tune your script.) I assumed your
>> restart-label is placed immediately before the stimulus Slide, so to
>> prevent the sound from restarting, you should now place it between the
>> SoundOut and Slide objects. (I.e., the order will be: SoundOut, Restart
>> Label, RecognitionSlide). If you do it like this, the sound should not
>> start early.
>>
>> But the again: I would stay away from goto-label constructs and use a
>> separate List object... If you use a list for repeating clicks, you can
>> even keep the sound as sub-object of the slide.
>>
>> Paul
>>
>> PS. I just tested this, but EPrime ran into problems when the sound file
>> was always the same and defined as static text property (using a filename).
>> When the sound file is defined as attribute, EPrime will re-initialize the
>> sound object every iteration, and the problem disappeared.
>>
>>
>>
>>
>>
>>
>>
>> On 27 January 2014 11:46, <haslinge... at gmail.com> wrote:
>>
>>> Hallo Paul
>>>
>>> Thank you for your help.
>>> Unfortunately, the Sound file is played before the slide is opened, if I
>>> insert the SoundOut object before the restart Label in the procedure.
>>>
>>>
>>> Isn't there another way to express Else , so that
>>> really nothing happens, if a click occurs in the invalid area of the slide?
>>> Goto
>>> restart
>>>
>>>
>>>
>>>
>>>
>>> Am Freitag, 24. Januar 2014 19:11:59 UTC+1 schrieb Paul Groot:
>>>
>>>> Hans,
>>>>
>>>> I think that the solution for the restarted sound is to insert the
>>>> sound as separate SoundOut object before the restart label. The duration
>>>> could be set to zero, and stopafter to no. The The inline script should be
>>>> OK, although I personally prefer to use a separate list object instead of a
>>>> goto-label to construct a repeating loop until a valid item is clicked. By
>>>> using a sub-list you will automatically get all individual clicks in the
>>>> edat-file. You also might need a small piece of script to stop the sound.
>>>>
>>>> The problem with the overall RT should be handled by additional inline
>>>> script. Just subtract the RTTime of the valid response from the OnsetTime
>>>> of the (first) stimulus onset. You can look at the following example for
>>>> this: http://pfcgroot.nl/e-prime/83-example-scripts/88-
>>>> image-click-example.html
>>>>
>>>> Paul
>>>>
>>>>
>>>> On 24 January 2014 18:07, <haslinge... at gmail.com> wrote:
>>>>
>>>>> Hallo everybody
>>>>>
>>>>> I am trying to create a Task where an image (a Comic Scene) is given
>>>>> as a stimulus. Simultaneously, there is a sound file played, which
>>>>> describes the stimulus scene.
>>>>> Participants should choose 1of 4 possible answers (4 Images) by
>>>>> clicking.
>>>>>
>>>>> So i have got a slide with 5 slide-images (1 stimulus and 4 target
>>>>> Images) and 1 slide-sound-out sub-object.
>>>>>
>>>>> I've used the following inLine code to define the 4 target Images as
>>>>> clickable targets and to check, if the clicked image is the correct answer:
>>>>>
>>>>>
>>>>>
>>>>> Dim theState as SlideState
>>>>> Set theState = RecognitionSlide.States("Default")
>>>>> Dim next_mX as Long, next_mY as Long
>>>>> Dim strHit As String
>>>>> Dim theMouseResponseData As MouseResponseData
>>>>>
>>>>>
>>>>> If RecognitionSlide.InputMasks.Responses.Count > 0 Then
>>>>>
>>>>> Set theMouseResponseData = CMouseResponseData(
>>>>> RecognitionSlide.InputMasks.Responses(1))
>>>>>
>>>>>
>>>>> strHit = theState.HitTest(theMouseResponseData.CursorX,
>>>>> theMouseResponseData.CursorY)
>>>>>
>>>>>
>>>>> If strHit = ("Image1") or strHit = ("Image2") or
>>>>> strHit = ("Image3")or strHit = ("Image4") Then
>>>>> c.SetAttrib "response", strHit
>>>>>
>>>>> Else
>>>>> Goto restart
>>>>> End If
>>>>>
>>>>>
>>>>> If strHit = c.GetAttrib("CorrectEmotion") Then
>>>>> RecognitionSlide.ACC = 1
>>>>> Else
>>>>> RecognitionSlide.ACC = 0
>>>>> End If
>>>>>
>>>>>
>>>>> My Problem is, that everytime you click somewhere else than the 4
>>>>> target Images, the Sound file and RT-measures start again.
>>>>>
>>>>> So basically i need something else than the code
>>>>> Else
>>>>> Goto restart
>>>>> which doesn't cause the slide to be reset.
>>>>>
>>>>>
>>>>> Is there any way to make everything but the 4 target Images
>>>>> unclickable?
>>>>> I hope you understand what i mean.
>>>>>
>>>>> Any help would be appreciated
>>>>> Best regards
>>>>> Hans
>>>>>
>>>>> --
>>>>> 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+u... at googlegroups.com.
>>>>> To post to this group, send email to e-p... at googlegroups.com.
>>>>>
>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>> msgid/e-prime/a7f4d4a6-855b-4d6c-9944-08d07ece19bc%40googlegroups.com.
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>
>>>> --
>>> 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+u... at googlegroups.com.
>>> To post to this group, send email to e-p... at googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/e-prime/c74d6a70-2f5b-4b95-a869-9933095cd165%40googlegroups.com
>>> .
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
> Am Montag, 27. Januar 2014 22:23:44 UTC+1 schrieb Paul Groot:
>>
>> Hi Hans,
>>
>> Perhaps I'm mixing things up, but if I understand your design correctly,
>> it should be possible to move the sound from the Stimulus slide to a
>> separate SoundOut object just before the Stimulus Slide, without disturbing
>> anything. (Ignoring the restart label for now.) If the duration of the
>> SoundOut object is set to zero, the onset of the sound should (almost)
>> coincide with the onset of the image. (If the onset times of the stimuli
>> are critical, you will have to measure sound and display onsets using
>> suitable instruments and fine-tune your script.) I assumed your
>> restart-label is placed immediately before the stimulus Slide, so to
>> prevent the sound from restarting, you should now place it between the
>> SoundOut and Slide objects. (I.e., the order will be: SoundOut, Restart
>> Label, RecognitionSlide). If you do it like this, the sound should not
>> start early.
>>
>> But the again: I would stay away from goto-label constructs and use a
>> separate List object... If you use a list for repeating clicks, you can
>> even keep the sound as sub-object of the slide.
>>
>> Paul
>>
>> PS. I just tested this, but EPrime ran into problems when the sound file
>> was always the same and defined as static text property (using a filename).
>> When the sound file is defined as attribute, EPrime will re-initialize the
>> sound object every iteration, and the problem disappeared.
>>
>>
>>
>>
>>
>>
>>
>> On 27 January 2014 11:46, <haslinge... at gmail.com> wrote:
>>
>>> Hallo Paul
>>>
>>> Thank you for your help.
>>> Unfortunately, the Sound file is played before the slide is opened, if I
>>> insert the SoundOut object before the restart Label in the procedure.
>>>
>>>
>>> Isn't there another way to express Else , so that
>>> really nothing happens, if a click occurs in the invalid area of the slide?
>>> Goto
>>> restart
>>>
>>>
>>>
>>>
>>>
>>> Am Freitag, 24. Januar 2014 19:11:59 UTC+1 schrieb Paul Groot:
>>>
>>>> Hans,
>>>>
>>>> I think that the solution for the restarted sound is to insert the
>>>> sound as separate SoundOut object before the restart label. The duration
>>>> could be set to zero, and stopafter to no. The The inline script should be
>>>> OK, although I personally prefer to use a separate list object instead of a
>>>> goto-label to construct a repeating loop until a valid item is clicked. By
>>>> using a sub-list you will automatically get all individual clicks in the
>>>> edat-file. You also might need a small piece of script to stop the sound.
>>>>
>>>> The problem with the overall RT should be handled by additional inline
>>>> script. Just subtract the RTTime of the valid response from the OnsetTime
>>>> of the (first) stimulus onset. You can look at the following example for
>>>> this: http://pfcgroot.nl/e-prime/83-example-scripts/88-
>>>> image-click-example.html
>>>>
>>>> Paul
>>>>
>>>>
>>>> On 24 January 2014 18:07, <haslinge... at gmail.com> wrote:
>>>>
>>>>> Hallo everybody
>>>>>
>>>>> I am trying to create a Task where an image (a Comic Scene) is given
>>>>> as a stimulus. Simultaneously, there is a sound file played, which
>>>>> describes the stimulus scene.
>>>>> Participants should choose 1of 4 possible answers (4 Images) by
>>>>> clicking.
>>>>>
>>>>> So i have got a slide with 5 slide-images (1 stimulus and 4 target
>>>>> Images) and 1 slide-sound-out sub-object.
>>>>>
>>>>> I've used the following inLine code to define the 4 target Images as
>>>>> clickable targets and to check, if the clicked image is the correct answer:
>>>>>
>>>>>
>>>>>
>>>>> Dim theState as SlideState
>>>>> Set theState = RecognitionSlide.States("Default")
>>>>> Dim next_mX as Long, next_mY as Long
>>>>> Dim strHit As String
>>>>> Dim theMouseResponseData As MouseResponseData
>>>>>
>>>>>
>>>>> If RecognitionSlide.InputMasks.Responses.Count > 0 Then
>>>>>
>>>>> Set theMouseResponseData = CMouseResponseData(
>>>>> RecognitionSlide.InputMasks.Responses(1))
>>>>>
>>>>>
>>>>> strHit = theState.HitTest(theMouseResponseData.CursorX,
>>>>> theMouseResponseData.CursorY)
>>>>>
>>>>>
>>>>> If strHit = ("Image1") or strHit = ("Image2") or
>>>>> strHit = ("Image3")or strHit = ("Image4") Then
>>>>> c.SetAttrib "response", strHit
>>>>>
>>>>> Else
>>>>> Goto restart
>>>>> End If
>>>>>
>>>>>
>>>>> If strHit = c.GetAttrib("CorrectEmotion") Then
>>>>> RecognitionSlide.ACC = 1
>>>>> Else
>>>>> RecognitionSlide.ACC = 0
>>>>> End If
>>>>>
>>>>>
>>>>> My Problem is, that everytime you click somewhere else than the 4
>>>>> target Images, the Sound file and RT-measures start again.
>>>>>
>>>>> So basically i need something else than the code
>>>>> Else
>>>>> Goto restart
>>>>> which doesn't cause the slide to be reset.
>>>>>
>>>>>
>>>>> Is there any way to make everything but the 4 target Images
>>>>> unclickable?
>>>>> I hope you understand what i mean.
>>>>>
>>>>> Any help would be appreciated
>>>>> Best regards
>>>>> Hans
>>>>>
>>>>> --
>>>>> 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+u... at googlegroups.com.
>>>>> To post to this group, send email to e-p... at googlegroups.com.
>>>>>
>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>> msgid/e-prime/a7f4d4a6-855b-4d6c-9944-08d07ece19bc%40googlegroups.com.
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>
>>>> --
>>> 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+u... at googlegroups.com.
>>> To post to this group, send email to e-p... at googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/e-prime/c74d6a70-2f5b-4b95-a869-9933095cd165%40googlegroups.com
>>> .
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
> Am Montag, 27. Januar 2014 22:23:44 UTC+1 schrieb Paul Groot:
>>
>> Hi Hans,
>>
>> Perhaps I'm mixing things up, but if I understand your design correctly,
>> it should be possible to move the sound from the Stimulus slide to a
>> separate SoundOut object just before the Stimulus Slide, without disturbing
>> anything. (Ignoring the restart label for now.) If the duration of the
>> SoundOut object is set to zero, the onset of the sound should (almost)
>> coincide with the onset of the image. (If the onset times of the stimuli
>> are critical, you will have to measure sound and display onsets using
>> suitable instruments and fine-tune your script.) I assumed your
>> restart-label is placed immediately before the stimulus Slide, so to
>> prevent the sound from restarting, you should now place it between the
>> SoundOut and Slide objects. (I.e., the order will be: SoundOut, Restart
>> Label, RecognitionSlide). If you do it like this, the sound should not
>> start early.
>>
>> But the again: I would stay away from goto-label constructs and use a
>> separate List object... If you use a list for repeating clicks, you can
>> even keep the sound as sub-object of the slide.
>>
>> Paul
>>
>> PS. I just tested this, but EPrime ran into problems when the sound file
>> was always the same and defined as static text property (using a filename).
>> When the sound file is defined as attribute, EPrime will re-initialize the
>> sound object every iteration, and the problem disappeared.
>>
>>
>>
>>
>>
>>
>>
>> On 27 January 2014 11:46, <haslinge... at gmail.com> wrote:
>>
>>> Hallo Paul
>>>
>>> Thank you for your help.
>>> Unfortunately, the Sound file is played before the slide is opened, if I
>>> insert the SoundOut object before the restart Label in the procedure.
>>>
>>>
>>> Isn't there another way to express Else , so that
>>> really nothing happens, if a click occurs in the invalid area of the slide?
>>> Goto
>>> restart
>>>
>>>
>>>
>>>
>>>
>>> Am Freitag, 24. Januar 2014 19:11:59 UTC+1 schrieb Paul Groot:
>>>
>>>> Hans,
>>>>
>>>> I think that the solution for the restarted sound is to insert the
>>>> sound as separate SoundOut object before the restart label. The duration
>>>> could be set to zero, and stopafter to no. The The inline script should be
>>>> OK, although I personally prefer to use a separate list object instead of a
>>>> goto-label to construct a repeating loop until a valid item is clicked. By
>>>> using a sub-list you will automatically get all individual clicks in the
>>>> edat-file. You also might need a small piece of script to stop the sound.
>>>>
>>>> The problem with the overall RT should be handled by additional inline
>>>> script. Just subtract the RTTime of the valid response from the OnsetTime
>>>> of the (first) stimulus onset. You can look at the following example for
>>>> this: http://pfcgroot.nl/e-prime/83-example-scripts/88-
>>>> image-click-example.html
>>>>
>>>> Paul
>>>>
>>>>
>>>> On 24 January 2014 18:07, <haslinge... at gmail.com> wrote:
>>>>
>>>>> Hallo everybody
>>>>>
>>>>> I am trying to create a Task where an image (a Comic Scene) is given
>>>>> as a stimulus. Simultaneously, there is a sound file played, which
>>>>> describes the stimulus scene.
>>>>> Participants should choose 1of 4 possible answers (4 Images) by
>>>>> clicking.
>>>>>
>>>>> So i have got a slide with 5 slide-images (1 stimulus and 4 target
>>>>> Images) and 1 slide-sound-out sub-object.
>>>>>
>>>>> I've used the following inLine code to define the 4 target Images as
>>>>> clickable targets and to check, if the clicked image is the correct answer:
>>>>>
>>>>>
>>>>>
>>>>> Dim theState as SlideState
>>>>> Set theState = RecognitionSlide.States("Default")
>>>>> Dim next_mX as Long, next_mY as Long
>>>>> Dim strHit As String
>>>>> Dim theMouseResponseData As MouseResponseData
>>>>>
>>>>>
>>>>> If RecognitionSlide.InputMasks.Responses.Count > 0 Then
>>>>>
>>>>> Set theMouseResponseData = CMouseResponseData(
>>>>> RecognitionSlide.InputMasks.Responses(1))
>>>>>
>>>>>
>>>>> strHit = theState.HitTest(theMouseResponseData.CursorX,
>>>>> theMouseResponseData.CursorY)
>>>>>
>>>>>
>>>>> If strHit = ("Image1") or strHit = ("Image2") or
>>>>> strHit = ("Image3")or strHit = ("Image4") Then
>>>>> c.SetAttrib "response", strHit
>>>>>
>>>>> Else
>>>>> Goto restart
>>>>> End If
>>>>>
>>>>>
>>>>> If strHit = c.GetAttrib("CorrectEmotion") Then
>>>>> RecognitionSlide.ACC = 1
>>>>> Else
>>>>> RecognitionSlide.ACC = 0
>>>>> End If
>>>>>
>>>>>
>>>>> My Problem is, that everytime you click somewhere else than the 4
>>>>> target Images, the Sound file and RT-measures start again.
>>>>>
>>>>> So basically i need something else than the code
>>>>> Else
>>>>> Goto restart
>>>>> which doesn't cause the slide to be reset.
>>>>>
>>>>>
>>>>> Is there any way to make everything but the 4 target Images
>>>>> unclickable?
>>>>> I hope you understand what i mean.
>>>>>
>>>>> Any help would be appreciated
>>>>> Best regards
>>>>> Hans
>>>>>
>>>>> --
>>>>> 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+u... at googlegroups.com.
>>>>> To post to this group, send email to e-p... at googlegroups.com.
>>>>>
>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>> msgid/e-prime/a7f4d4a6-855b-4d6c-9944-08d07ece19bc%40googlegroups.com.
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>
>>>> --
>>> 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+u... at googlegroups.com.
>>> To post to this group, send email to e-p... at googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/e-prime/c74d6a70-2f5b-4b95-a869-9933095cd165%40googlegroups.com
>>> .
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
--
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/msgid/e-prime/cc719d5c-c16c-49a6-ae0a-59feffce73d2%40googlegroups.com.
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/20140128/5e8ae7b0/attachment.htm>
More information about the Eprime
mailing list