How to underline/highlight chosen answers?

246 views
Skip to first unread message

Anna

unread,
Jul 1, 2013, 11:53:57 AM7/1/13
to e-p...@googlegroups.com

Hello!

I have a problem while using E-Prime (1.1.4.1 version). I’m making an ability test in which participants have to choose which two of four figures shown on the screen are the changed form of the stimulus. On slide (“TestA”) there is an image of stimulus and four images of figures (possible answers). Under each of them there are slidetexts with numbers: 1, 2, 3, 4 (named: “Odp1”, “Odp2”, “Odp3”, “Odp4”) and participants use keyboard (1, 2, 3, 4) to select correct answers. I would like the number which is chosen to be underlined or highlighted and if two of them are chosen the next screen should appear (the test consists of many tasks). Is it possible to do this with my version of e-Prime? I’ve tried so many options and nothing works.

The second question is what I should do to make it possible to undo one’s choice when someone changes his/her mind after having chosen one of the numbers. If there is such a possibility then I would also need to have 2 of 4 numbers underlined when someone chooses two answers (and then pressing enter would change the screen).

I would be very grateful if you could help me with this problem,

Anna

David McFarlane

unread,
Jul 3, 2013, 12:24:36 PM7/3/13
to e-p...@googlegroups.com
Anna,

Roughly speaking, you may add underlining or highlighting to stimuli
by changing their properties (e.g., BackColor, Underline) and then
redrawing them. You may change properties by using attribute
references (my preferred method, see
https://groups.google.com/d/topic/e-prime/dWpfjk-BeLs ), or directly
in code, as appropriate. Or, you may do things directly with Canvas
drawing commands, see the Canvas topic in the E-Basic Help facility.

Of course, the specifics can get tricky...

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

Anna

unread,
Jul 4, 2013, 9:41:53 AM7/4/13
to e-p...@googlegroups.com

Hi David,

thank you for your reply but it’s not exactly what I’m looking for. I’m interested in a solution which will allow to underline text objects with the numbers of possible responses after respondent makes a choice using keyboard. For example, if respondent presses “1”, the text object with number “1”will be underlined/highlighted or its backcolor will change.

Have you got any idea how to do this?

Regards,

Anna

Paul Groot

unread,
Jul 4, 2013, 12:03:19 PM7/4/13
to e-p...@googlegroups.com

This is very similar to what I posted yesterday (to another question), but I will extent the script a bit to make it more clear:

Dim strName as String
Dim theState as SlideState
Dim theText as SlideText
strName = "Odp" & Slide1.RESP
Set theState = Slide1.States (Slide1.ActiveState)
Set theText = CSlideText(theState.Objects(strName))
If Not theText Is Nothing Then
   ' just changing a few properties here...
   theText.BackColor = CColor("silver")
   theText.FontBold = CLogical("Yes")
   theText.FontUnderline = CLogical("Yes")
   theText.Draw
Else
   '  oops: unexpected response
End If

Make sure to replace Slide1 with the name of your slide. Also ,you still have to make sure that the changed graphics will be visible for some time. (E.g. use a wait object)

Paul



--
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+u...@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/98d3fef9-9a87-45df-8883-b93290ce926d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages