Two questions

David McFarlane mcfarla9 at msu.edu
Mon Mar 18 18:15:08 UTC 2013


strMessage = ""

-- David McFarlane


At 3/18/2013 02:00 PM Monday, Tim Ritzert wrote:
>Thanks Paul!
>
>One final question: I now have everything working except I can't 
>figure out how to clear the global strMessage variable at the start 
>of each new cycle - is there a simple line of code to do the trick?
>
>Again, thanks so much, the help is very much appreciated!
>
>-Tim
>
>
>
>On Tue, Mar 12, 2013 at 5:43 PM, Paul Groot 
><<mailto:pfc.groot at gmail.com>pfc.groot at gmail.com> wrote:
>If the stimuli are simple text string, it would be rather easy to do 
>as described before. The only thing to change is to to add another 
>if-statement to make sure that the current stimulus is only appended 
>to the feedback message if the response was "1":
>
>if StrComp(Stim.RESP,"1")=0 then
>    if Len(strMessage)=0 then
>       strMessage = "These are the stimuli: "
>    else
>       strMessage= strMessage & ", "
>    end if
>    strMessage= strMessage& c.GetAttrib("Stimulus")
>end if
>
>Perhaps it is even better to replace the "if Len(strMessage)=0 then" 
>test with the following: "if counter=0 then". (To reset the message 
>text if the counter is reset to zero.)
>
>best
>paul
>
>
>
>On 12 March 2013 22:21, Tim Ritzert 
><<mailto:tritzert at kent.edu>tritzert at kent.edu> wrote:
>Paul,
>
>Thanks so much for the help - the first part seems easy enough and 
>I'll see how that goes.
>
>As for my second question: I want participants to go through a set 
>of 100 stimuli and answer either "1" "2" or "3" to each one, do this 
>again until there are 7 or less "1" responses, and then at the end I 
>want E-Prime to display the final 7 or less stimuli that were 
>responded to with a "1" all at the same time. As I have it now, they 
>display one at a time.
>
>Hope that makes sense, this is all new to me!
>
>-Tim
>
>Sent from my iPhone
>
>On Mar 12, 2013, at 5:01 PM, Paul Groot 
><<mailto:pfc.groot at gmail.com>pfc.groot at gmail.com> wrote:
>
>>Tim,
>>
>>The easiest way to do this is to use the []-attribute syntax in the 
>>allowable field: [MyKeys]. The MyKeys attribute is normally defined 
>>in a list object, but you can also assign values in a small inline script:
>>
>>if counter<7 then
>>     c.SetAttrib "MyKeys", "AaBb"
>>else
>>     c.SetAttrib "MyKeys", "XxYy
>>end if
>>
>>I'm not sure if I understand the second question, but my guess is 
>>that it would be rather easy to keep a global variable that is used 
>>to ensemble an message string for the incorrect responses.
>>
>>if Len(strMessage)=0 then
>>    strMessage = "You entered the following wrong responses: "
>>else
>>    strMessage= strMessage & ", "
>>end if
>>strMessage= strMessage& c.GetAttrib("Stimulus")
>>
>>This variable can then be used to display a feedback message (again 
>>using a []-attribute reference):
>>
>>c.SetAttrib "Message", strMessage
>>
>>You must also take care to clear the global strMessage variable at 
>>the start of each new series.
>>(And don't forget to declare the global strMessage variable)
>>
>>Best
>>Paul
>>
>>
>>On 12 March 2013 20:53, Tim 
>><<mailto:tritzert at kent.edu>tritzert at kent.edu> wrote:
>>I am running a study in which participants re-run trials based on 
>>previous responses (i.e. errors are re-run until reaching a criterion of 7).
>>
>>That all works wonderful, however I would like to change the 
>>allowable responses during certain re-runs of the stimuli. I 
>>already have cycle counter declared as a global variable (counting 
>>the number of re-runs) but I cannot determine the inline syntax 
>>necessary to tell E-Prime to change the allowable responses based 
>>on the value of the cycle counter. Does anyone know how this would be done?
>>
>>Also, does anyone know how to simultaneously display multiple 
>>levels of the same attribute on one text display? This is for the 
>>same study as above. Basically, when participants reach criterion 
>>of # of errors, I would like to display all errors simultaneously.
>>
>>Thanks so much in advance,
>>Tim

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.



More information about the Eprime mailing list