User changing attributes

Cameron Ellis cameron.t.ellis at hotmail.com
Wed Feb 6 23:16:06 UTC 2013


Hi there,

I am currently making a programme in which I have set up a number of 
attributes that I want the participant to be able to change mid schedule. I 
have tried two strategies to achieve this but both have failed. I will 
detail both them below. The first is to use inline code:

Dim t, v, d as integer

t% = Answerbox ("Are you happy with the speed and size of stimuli?", "No", 
"Yes")

If t<1 Then

     v% = Answerbox("Select your new speed", "Fast", "Medium", "Slow" )

     MsgBox "Your new speed is" & v%

     d% = Answerbox("Select your new circle size", "Small", "Medium", 
"Large" )

     MsgBox "Your new circle size is" & d%

    c.SetAttrib"speed1", 12.5*"d%"

    c.SetAttrib"Circle", 5*"d%"

    Sleep 2000

Else

Sleep 2000

End


So I want the program to ask a question initially to see whether the 
participant wants to change the setting using Answerbox. If they are happy 
the program should finish. If they are not fine with them then I would like 
to ask two questions that enable them to change the values of v and d. 
These variables are then used to set the attributes for speed1 and Circle. 
The error that I get is that the identifier is already a variable in the 
first line

The second strategy I used was to create a Textdisplay asking for inputs. 
The display records the information correctly and I have set up an echo 
too. The problem I have is assigning the input to the attributes. So how do 
I make it that when the participant enters 15 into the text display this 
assigns [Circle] to that value? I have tried one solution using inline as 
follows.

Dim a as integer

CInt(TextDisplay3.Name & ".RESP")=a

c.SetAttrib"Circle", a

As I understand it, TextDisplay3.Name & ".RESP" is the string for the 
response in the previous slide. By making it an integer I can then use 
c.SetAttrib to change the value of a circle. However I get the error that I 
cannot assign to a constant in the second line.

Help on either method would be greatly appreciated, 

Thank you,
Cameron

-- 
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/msg/e-prime/-/HcX-oI12tIYJ.
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/20130206/28d891e8/attachment.htm>


More information about the Eprime mailing list