limiting numbers of the box selection

Güzin Mazman s.guzin at gmail.com
Tue Feb 28 10:20:21 UTC 2012


Hi, I am developing an experiment which participants must remember the
orientataion of numbers presented sequentially. Participants will click on
the empty boxes which would show the orientation of top of numbers.
A slide which displays 8 empty boxes images arranged like circle on the
screen and show one of the 8 different angles (45, 90, 135....). After
participant click on the box, it will be checked by filling.
I have done until here.
 My problem is limiting the numbers of checking boxes. I mean for first
trial block particpnat will select only two boxes that are correct. If they
choose a third one, I want their last selection will dissapper. Or maybe
program will not allow to select choosing more than two. My boxes names
are; Check1, Check2, Check3, Check4, Check5, Check6, Check7, Check8.
I attached two imaged that are selected or not selected. I am including my
code below.
Coul you help me how can I limit numbers of selecting .

Dim theState as SlideState
Set theState = Stimulus.States("Default")

'Variable for holding the name of the sub-object clicked by the subject.
Dim strHit As String

'Variable for holding the subject's response information.
Dim theMouseResponseData As MouseResponseData


'Was a response made?
If Stimulus.InputMasks.Responses.Count > 0 Then

'Get the mouse response
Set theMouseResponseData =
CMouseResponseData(Stimulus.InputMasks.Responses(1))

'Determine string name of SlideImage or SlideText object at
'mouse click coordinates. Assign that value to strHit
strHit = theState.HitTest(theMouseResponseData.CursorX,
theMouseResponseData.CursorY)

'If a check box was clicked, check or uncheck it based on its current state.
If Mid(strHit, 1, 5) = "Check" Then

'Store the number of the checkbox clicked.
Dim nCheck As Integer
nCheck = CInt(Mid(strHit, 6, 1))

Debug.Print nCheck

If c.GetAttrib("Check" & nCheck & "Image") = "checkempty.bmp" Then
 c.SetAttrib "Check" & nCheck & "Image", "checkfull.bmp"

'If a box has been checked, log the RT and RESP.

Else

c.SetAttrib "Check" & nCheck & "Image", "checkempty.bmp"
c.Setattrib "Check" & nCheck & "RESP", ""
 End If


 End IF
if c.GetAttrib("Check4Image")="checkfull.bmp" and
c.GetAttrib("Check5Image")="checkfull.bmp" and
c.GetAttrib("Check1Image")="checkempty.bmp" and
c.GetAttrib("Check2Image")="checkempty.bmp" and
c.GetAttrib("Check3Image")="checkempty.bmp" and
c.GetAttrib("Check6Image")="checkempty.bmp" and
c.GetAttrib("Check7Image")="checkempty.bmp" and
c.GetAttrib("Check8Image")="checkempty.bmp" Then
     'if strHit = "Check5" and strHit = "Check4" Then
 Stimulus.ACC = 1

else Stimulus.ACC = 0
End if

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20120228/b28f4b2a/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: selected.jpg
Type: image/jpeg
Size: 7876 bytes
Desc: not available
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20120228/b28f4b2a/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: empty_boxes.jpg
Type: image/jpeg
Size: 8029 bytes
Desc: not available
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20120228/b28f4b2a/attachment-0001.jpg>


More information about the Eprime mailing list