<div dir="ltr"><div>hi,<br><br>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: <br>
{ALPHA}{=}{+}{ENTER}<br><br>If you use the enter-key as input-terminator, you also have to include that one explicitly.<br><br></div>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):<br>
<br><font size="1"><span style="font-family:courier new,monospace">Dim t As String<br>Dim pos As Integer<br>Dim ii As Integer<br><br>' Define a table with two columns: {key} and replacement<br>' The rows must include all literal {key}'s used in the input allowable mask<br>
Const NSPECIAL%=3<br>Dim special (1 To NSPECIAL, 1 To 2) As String<br>special(1,1) = "{+}"<br>special(1,2) = "+"<br>special(2,1) = "{=}"<br>special(2,2) = "="<br>special(3,1) = "{ENTER}"<br>
special(3,2) = ""<br><br>t = UCase(TextDisplay1.RESP) 'convert input to upper case<br>For ii=1 To NSPECIAL<br> Dim key As String<br> key = special(ii,1)<br> <br> 'find special {key} strings<br>
pos = InStr(t,key)<br> If pos<>0 Then<br> ' replace special {key}'s with their original character<br> t = Left(t,pos-1) & special(ii,2) & Mid(t,pos+Len(key))<br> ii = ii-1 ' tricky cheat: retry this same special sequence again<br>
End If<br>Next<br><br>' show result in next text display object<br>TextDIsplay<font size="1">2</font>.Text = TextDisplay1.RESP & ebCrLf & "is replaced by:" & ebCrLf & t <br><br>'overwrite the RESP attribute (note: disable default loging first)<br>
c.SetAttrib TextDisplay1.Name & ebDot & ebLogNameRESP, t</span></font><br><br><br><div>Also find this example code in the attached script (requires EP 2.0.10.242).<br><br></div><div>Best<br>Paul<br></div><div><br>
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 12 April 2013 20:17, HFAC <span dir="ltr"><<a href="mailto:bgbellows@gmail.com" target="_blank">bgbellows@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Matt,<div>I am also having a problem with E-Prime recording {SHIFT}. See my post for a more detailed explanation of my problem: <a href="https://groups.google.com/forum/?fromgroups=#!topic/e-prime/wysgwiaYR_0" target="_blank">https://groups.google.com/forum/?fromgroups=#!topic/e-prime/wysgwiaYR_0</a></div>
<div><br></div><div>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.</div><div><br>On Wednesday, April 16, 2008 1:10:01 PM UTC-4, Matt wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Joseph,
<br>
<br>I have added a sample experiment to the Files section of this group
<br>(TextString.es). This sample echoes subject responses and then "cleans
<br>up" the special characters that are used by parsing the string. You
<br>can look through the comments in the script to see how this parsing is
<br>done. The sample only handles a few cases (e.g., Shift, period, etc).
<br>However, you can modify the script to handle many different cases.
<br>
<br>Please let me know if you have any questions after looking at the
<br>sample.
<br>
<br>Sincerely,
<br>Matt Lenhart
<br>PST Technical Consultant
<br><a href="http://pstnet.com" target="_blank">http://pstnet.com</a></blockquote></div><span class="HOEnZb"><font color="#888888">
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:e-prime%2Bunsubscribe@googlegroups.com" target="_blank">e-prime+unsubscribe@googlegroups.com</a>.<br>
To post to this group, send email to <a href="mailto:e-prime@googlegroups.com" target="_blank">e-prime@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/e-prime/-/uvA3tqVcEa8J" target="_blank">https://groups.google.com/d/msg/e-prime/-/uvA3tqVcEa8J</a>.<br>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/groups/opt_out</a>.<br>
<br>
<br>
</font></span></blockquote></div><br></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe@googlegroups.com.<br />
To post to this group, send email to e-prime@googlegroups.com.<br />
For more options, visit <a href="https://groups.google.com/groups/opt_out">https://groups.google.com/groups/opt_out</a>.<br />
<br />
<br />