Passing/Evaluating Strings as Executable Code

Jacob Anderson jakey.anderson at gmail.com
Tue Jul 2 15:32:22 UTC 2013


 Dear Group,
I'm trying to streamline some of my inline code in a Touch Screen task. Is
it possible to pass string values as execuatable pieces of code in E-Basic?
I can do this in MATLAB (I think) and R using and eval() function, but is
there an analogue in E-Basic?

I've tried the following 'for' loop to assign an object border width using
the string returned from the HitTest function (Objects are named "R0"
through "R7"). I can compile the script fine, but it won't actually change
the attribute value for some reason. Perhaps I just need a second set of
eyes to point something out.  Any suggestions would be welcomed! Thanks,
Jake

Set MouseResp = CMouseResponseData(Question.InputMasks.Responses(1))
 Hit = theState.HitTest(MouseResp.CursorX, MouseResp.CursorY)
 Dim i as Integer
 Dim theBorder As String
 For i = 0 To 7
    theBorder = Hit & "BW"
    If i = CInt(Mid(Hit,2,1)) Then
      c.SetAttrib theBorder,"5"
    Else
      c.SetAttrib theBorder,"0"
    End If
 Next


-- 
*************************************************
Jacob E. Anderson, MA
Scientist @ The Zelazo Lab
Institute of Child Development
51 East River Rd.
Minneapolis, MN  55455

E-mail: jea at umn.edu
Cell:    763-458-7152

-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/CALexiWPWWsSUGpWHukvw5QgVGuOjsWgdk7RJuv61%2B6auP3rZPw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20130702/42da431a/attachment.htm>


More information about the Eprime mailing list