Reset Slide on Correct Type Number Answer

SombreNote sombrenote at gmail.com
Fri Mar 23 15:22:41 UTC 2012


Hi everyone,

I am having quite frustrating time doing something that on all
accounts is very easy. I have a procedure called:

ArithTe
+ Inline1 (Inline Code)
+ ArthProb (Slide set up with prompt text)
+ PendingReponses (more inline code)

What it is supposed to do is test to see if a number (which changes
every rerun), is correctly entered in a ECHO typed space on the slide.
If correct it should recycle the slide and change the number. This is
basically just a MIST task in which a person subtracts 7 from a number
as fast as possible. Right now it is simple and I have no added all
the bells and whistles. I am in contact with PST, but things are going
very slowly. Does anyone think they could point me in the right
direction?

This is a link to the 54kb file if you want it.  http://depositfiles.com/files/b3pib3et5
I will make it available when it is completed, because this is a
pretty common procedure.

#### Inline1 ######
'New code
lnStartTime = 0
lnEndTime = 0
lnBlockDuration = 0
boolBlockEnd = False
FirstRun = True
'lnStartTime = Clock.Read
lnEndTime = Clock.Read + 50000 '100000 '240000

Dim SlideOnsetTime As Long
Dim SlideStopTime As Long

'Declare a variable that can be assigned to the Stimulus object.
Dim theSlideC As Slide
Set theSlideC = CSlide(Rte.GetObject("ArthProb"))

'Declare a variable that can be assigned to the default SlideState.
Dim theStateC As SlideState
Set theStateC = theSlideC.States.Item("Default")

'Declare a variable that can be assigned to the SlideText sub-object
'that will be altered based on subject responses.

'Declare a variable that can be assigned to the ArthProb object.
Dim theSlide As Slide
Set theSlide = CSlide(Rte.GetObject("ArthProb"))
Dim theState As SlideState
Set theState = theSlide.States.Item("Default")
Dim theSlideText As SlideText
Set theSlideText = CSlideText(theState.Objects("StimulusText"))
Dim theSlideTextFROM As SlideText
Set theSlideTextFROM = CSlideText(theState.Objects("subfrom"))
Dim theSlideTextP As SlideText
Set theSlideTextP = CSlideText(theState.Objects("prompt"))

Dim Answer As Long
Answer = 2381
Set ArthProb.CRESP = Answer

Do 'STARTS THE DO LOOP to repeat ArthProd for as long as the clock
lasts.
SlideOnsetTime = Clock.Read
Set ArthProb.CRESP = Answer - 7
c.SetAttrib "CorrectAnswer" , ArthProb.CRESP

theSlideTextFROM.Text = c.GetAttrib("CorrectAnswer")
theSlideTextFROM.Draw

##### Stimlus Slide ######

##### PendingResponses ######
Dim theResponseObject As RteRunnableInputObject
Set theResponseObject =
CRteRunnableInputObject(Rte.GetObject("ArthProb"))

Dim nResponseCount As Long
Dim theResponseData As ResponseData

Do While theResponseObject.InputMasks.IsPending()
    If nResponseCount <> theResponseObject.InputMasks.Responses.Count
Then
        nResponseCount = nResponseCount + 1
        Set theResponseData =
theResponseObject.InputMasks.Responses(nResponseCount)
        If Not theResponseData Is Nothing Then
		If Clock.Read >= lnEndTime Then
			boolBlockEnd = True
			Exit Do
		End If

		'If  theResponseData.RESP = ArthProb.CRESP Then   'I have tried both
		If  ArthProb.RESP = ArthProb.CRESP Then
			ArthProb.ACC = 1
			boolBlockEnd = False
			Exit Do
		Else
			ArthProb.ACC = 0
		End If
        End If
    End If

'Give some time back (required)
Sleep 10
DoEvents

Loop
Loop Until boolBlockEnd = True


-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list