Script for cleaning up participants' typed responses

David McFarlane mcfarla9 at msu.edu
Mon Apr 15 18:12:59 UTC 2013


Google Groups removed support for uploaded files, so you cannot find 
Matt's program here anymore.  He did, however, also post it to a 
thread at http://www.pstnet.com/forum/Topic2194-5-1.aspx .  His 
example has not seemed to make it to the PST Samples section on the 
website yet.

You may find yet another example program at STEP, 
http://step.psy.cmu.edu/scripts-plus/ , see the KeyCodeMap example there.

-----
David McFarlane
E-Prime training 
online:  http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter:  @EPrimeMaster (https://twitter.com/EPrimeMaster)

/----
Stock reminder:  1) I do not work for PST.  2) PST's trained staff 
take any and all questions at 
http://support.pstnet.com/e%2Dprime/support/login.asp , and they 
strive to respond to all requests in 24-48 hours, so make full use of 
it.  3) In addition, PST offers several instructional videos on their 
YouTube channel (http://www.youtube.com/user/PSTNET ).  4) If you do 
get an answer from PST staff, please extend the courtesy of posting 
their reply back here for the sake of others.
\----


At 4/14/2013 04:23 PM Sunday, Paul Groot wrote:
>hi,
>
>You can get rid of explicit {SHIFT} responses in the response values 
>by setting an allowable mask that only includes the characters you 
>actually allow. For example, you might set it to the following to 
>allow alphabetic characters, the equal sign and the plus sign:
>{ALPHA}{=}{+}{ENTER}
>
>If you use the enter-key as input-terminator, you also have to 
>include that one explicitly.
>
>So, that is the easy part. If you also would like to replace the 
>special {key} responses with the original literal (i.e. replace {+} 
>with just +), you also have to add some script after the input 
>screen (TextDisplay1 in this example):
>
>Dim t As String
>Dim pos As Integer
>Dim ii As Integer
>
>' Define a table with two columns: {key} and replacement
>' The rows must include all literal {key}'s used in the input allowable mask
>Const NSPECIAL%=3
>Dim special (1 To NSPECIAL, 1 To 2) As String
>special(1,1) = "{+}"
>special(1,2) = "+"
>special(2,1) = "{=}"
>special(2,2) = "="
>special(3,1) = "{ENTER}"
>special(3,2) = ""
>
>t = UCase(TextDisplay1.RESP) 'convert input to upper case
>For ii=1 To NSPECIAL
>     Dim key As String
>     key = special(ii,1)
>
>     'find special {key} strings
>     pos = InStr(t,key)
>     If pos<>0 Then
>         ' replace special {key}'s with their original character
>         t = Left(t,pos-1) & special(ii,2) & Mid(t,pos+Len(key))
>         ii = ii-1 ' tricky cheat: retry this same special sequence again
>     End If
>Next
>
>' show result in next text display object
>TextDIsplay2.Text = TextDisplay1.RESP & ebCrLf & "is replaced by:" & 
>ebCrLf & t
>
>'overwrite the RESP attribute (note: disable default loging first)
>c.SetAttrib TextDisplay1.Name & ebDot & ebLogNameRESP, t
>
>
>Also find this example code in the attached script (requires EP 2.0.10.242).
>
>Best
>Paul
>
>
>
>
>On 12 April 2013 20:17, HFAC 
><<mailto:bgbellows at gmail.com>bgbellows at gmail.com> wrote:
>Matt,
>I am also having a problem with E-Prime recording {SHIFT}. See my 
>post for a more detailed explanation of my problem: 
><https://groups.google.com/forum/?fromgroups=#!topic/e-prime/wysgwiaYR_0>https://groups.google.com/forum/?fromgroups=#!topic/e-prime/wysgwiaYR_0
>
>I would like to try the script that you mentioned but cannot seem to 
>locate it. If possible, will you post a response to me and attach 
>it? I would greatly appreciate it.
>
>On Wednesday, April 16, 2008 1:10:01 PM UTC-4, Matt wrote:
>Hi Joseph,
>
>I have added a sample experiment to the Files section of this group
>(TextString.es). This sample echoes subject responses and then "cleans
>up" the special characters that are used by parsing the string. You
>can look through the comments in the script to see how this parsing is
>done. The sample only handles a few cases (e.g., Shift, period, etc).
>However, you can modify the script to handle many different cases.
>
>Please let me know if you have any questions after looking at the
>sample.
>
>Sincerely,
>Matt Lenhart
>PST Technical Consultant
><http://pstnet.com>http://pstnet.com

-- 
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