Sigh. I sound like a broken record, because this same issue keeps
coming up here. This looks like another example where the combination
of GeneratePreRun, PreRelease, and InLine code causes problems. Go to
the E-Prime Knowledge Base at the PST website, do a search on those
terms, and take it from there. The Experiment Advisor in EP2.0.10
Professional will also warn you about this, you should heed that warning.
<editorial>
Before EP2.0.10, inline code pretty much worked as users expected, but
getting critical timing to work took a lot of effort. With EP2.0.10,
critical timing got a lot more effortless, at the expense of tripping up
some users' expectations of inline code. Sometimes you just can't win.
</editoria>
On another note, I never understand why users persist in using attribute
values when they could much more easily use the values of the underlying
object properties directly. Yes, I generally discourage *assigning*
*control* values directly to object properties (see
https://groups.google.com/d/topic/e-prime/RBwU6WDdlG8 ), but I do not
apply that to assigning values to *response* properties, nor to merely
*using* the values. So why not rewrite your inline code as
Debug.Print Slide3.RESP
If Slide3.RESP = "r" Then
Blank7.RESP = "r"
Debug.Print "Slide3=r"
ElseIf Slide3.RESP = "f" Then
Blank7.RESP = "f"
Debug.Print "Slide3=f"
ElseIf Slide3.RESP = "1" Then
Debug.Print "Slide3.RESP=1"
Else Debug.Print "something else"
End If
and
' Counting number of correct and incorrect answers
If Blank7.RESP = "r" Then
Correct = Correct + 1
Incorrect = 0
ElseIf Blank7.RESP = "f" Then
Incorrect = Incorrect + 1
End If
If Incorrect > 4 Then
Ordlista.Terminate
End If
If Slide3.RESP = "1" Then
Responses = Responses + 1
End If
c.SetAttrib "Blank7.RESP", Blank7.RESP ' just in case
? Hmm, as long as I've gone that far, might as well replace those
If-ElseIf structures with Select-Case (and tighten up the code just a
bit with a couple single-line If-Thens) ...
Debug.Print Slide3.RESP
Select Case Slide3.RESP
Case "r"
Blank7.RESP = "r"
Debug.Print "Slide3=r"
Case "f"
Blank7.RESP = "f"
Debug.Print "Slide3=f"
Case "1"
Debug.Print "Slide3.RESP=1"
Case Else
Debug.Print "something else"
End Select
and
' Counting number of correct and incorrect answers
Select Blank7.RESP
Case "r"
Correct = Correct + 1
Incorrect = 0
Case "f"
Incorrect = Incorrect + 1
Case Else
' do nothing
End Select
If Incorrect > 4 Then Ordlista.Terminate
If Slide3.RESP = "1" Then Responses = Responses + 1
c.SetAttrib "Blank7.RESP", Blank7.RESP ' just in case
-- David McFarlane
> *No such attribute "Blank7.RESP"*I'd be very grateful for some help on this.
> Best, Ingrid