Back
Login
Register
Login
Register
Millisecond Forums
Home
»
Millisecond Forums
»
Inquisit 4
»
Set position of shape in a list?
Set position of shape in a list?
Post Reply
Like
18
Prev
1
2
Jump To Page
Set position of shape in a list?
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Dave
Dave
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 109K
As a starting point, consider the below minimal example. Suppose you have two shapes A and B, both to be presented in a given trial at different times in random order. You want the 1st shape presented to always be on the left side, the 2nd always on the right side -- regardless of whether the 1st shape displayed is A or B:
<block myblock>
/ trials = [1-4=mytrial]
</block>
<trial mytrial>
/ posttrialpause = 500
/ stimulustimes = [0=list.shapelist; 1000=list.shapelist]
/ validresponse = (57)
</trial>
<list shapelist>
/ items = (shape.a, shape.b)
/ selectionmode = random
/ selectionrate = always
</list>
<shape a>
/ shape = rectangle
/ size = (5%, 5%)
/ color = (red)
/ vposition = 50%
/ hposition = list.hposlist.nextvalue
</shape>
<shape b>
/ shape = rectangle
/ size = (5%, 5%)
/ color = (blue)
/ vposition = 50%
/ hposition = list.hposlist.nextvalue
</shape>
<list hposlist>
/ items = (25%, 75%)
/ selectionrate = always
/ selectionmode = sequence
</list>
Note that you need not know a shape's name to achieve the positioning.
Reply
Like
17
nashby
nashby
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 78,
Visits: 159
Here is the experiment I am trying to program (
http://www.geocities.ws/maro_g_machizawa/documents/Nature2005.pdf)
its experiment 2.
This is the design in a nutshell:
I have 7 different colored boxes. On each trial a quadrant ( if two items) or side of the screen (if 4 items) is indicated as being the area where participants need to remember what is flashed. Then, either 2 (in the same quadrant) or 4 (2 in upper quadrant, 2 in lower quadrant) non repeating randomly selected colored boxes from the list of 7 are flashed within that quadrant or side, but at random locations which do not overlap. Following the flash there is a brief blank screen and then the colored boxes come back in the same locations as before but on 50% of trials one of the colored boxes changes color. Participants task is to say whether they are the same or different.
Reply
Like
16
Dave
Dave
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 109K
I'm pretty sure there is a way to do this, however, the few code snippets you posted don't convey sufficient detail re. your setup. Can you provide a simplified, concise, self-contained (i.e. runnable) example?
As to this:
"I have also tried this which doesnt break the code but doesnt set the locations either.
/ ontrialbegin = [shape.{list.cb1.items.1}.hposition = (counter.locationsx.selectedvalue );shape.{list.cb1.items.1}.vposition = (counter.locationsy.selectedvalue );]"
It's invalid syntax and should not be expected to work.
Reply
Like
17
nashby
nashby
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 78,
Visits: 159
I have also tried this which doesnt break the code but doesnt set the locations either.
/ ontrialbegin = [shape.{list.cb1.items.1}.hposition = (counter.locationsx.selectedvalue );shape.{list.cb1.items.1}.vposition = (counter.locationsy.selectedvalue );]
Reply
Like
11
nashby
nashby
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 78,
Visits: 159
Hey Dave thanks for the response. I know how to define a shape position but that will not work for this purpose as it would require me to know the name of the shape which I dont as it needs to be random. Basically I am adding boxes to a list randomly using a counter. I then need to define that the first item in a list go to location X Y, while the second go to location X2 Y2. Is there no way to do this?
Reply
Like
16
Dave
Dave
posted 11 Years Ago
ANSWER
Post Details
Share Post
Group: Administrators
Posts: 13K,
Visits: 109K
> I have tried things like this:
> shape.list.cb1.item.1.hposition =
> list.cb1.item.1.hposition =
list elements don't have any position properties, the underlying shape elements do. You thus need to manipulate those element's position.
shape.someshape.hposition = ...
Reply
Like
18
nashby
nashby
posted 11 Years Ago
ANSWER
HOT
Topic Details
Share Topic
Group: Forum Members
Posts: 78,
Visits: 159
I am trying to design a simple change detection task where a flash say what quadrant participants need to remember items from and then random colored boxes (with no repetition) are flashed in that quadrant of the screen and then return (sometimes the same colored boxes, sometimes different). I am having a hard time trying to define where the positions of the boxes are. So far I have this which creates a list with the random colored boxes and then adds them into the memory and test trials, but I cannot seem to define the locations of the list items which is important as I need to say for instance that the first two items in the list show up in locations X1 and X2, while the next items show up in a different quadrant.
I have tried things like this:
shape.list.cb1.item.1.hposition =
list.cb1.item.1.hposition =
but these do not work. Getting quite frustrated as I cannot find any documentation or examples to help with this (been stuck on it about a week now).
Any help would be greatly appreciated.
<trial Set1>
/ trialduration = 500
/ ontrialbegin = [trial.set1.clearstimulusframes()]
/ ontrialbegin = [trial.set1.insertstimulusframe(shape.FlashUR, 1)]
/ ontrialbegin = [trial.memory.clearstimulusframes()]
/ ontrialbegin = [list.cb1.clearitems()]
/ ontrialbegin = [list.cb1.insertitem(counter.colorboxes.selectedvalue, 1); list.cb1.insertitem(counter.colorboxes.selectedvalue, 2); list.cb1.insertitem(counter.colorboxes.selectedvalue, 3);]
/ ontrialbegin = [{trial.memory.insertstimulusframe(list.cb1.items.1, 1); trial.Memory.insertstimulusframe(list.cb1.items.2, 2);}]
/ ontrialbegin = [{trial.test.insertstimulusframe(list.cb1.items.1, 1); trial.test.insertstimulusframe(list.cb1.items.2, 2);}]
</trial>
Reply
Like
18
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
18
Prev
1
2
Jump To Page
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Facebook
Explore
Messages
Mentions
Search