Values as an item in picture element ?


Author
Message
kulajw
kulajw
Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)
Group: Forum Members
Posts: 51, Visits: 256
Hello,

I would like to use  a dynamically changing values element assigned to an item attributes in picture element, however I have an error:
Unable to initialize <picture right> item number 1. Verify the item exists and is correctly defined.

Let say this is a code illustrating my problem:

<values>
right_presentation = "picture1.bmp"
</values.>

<picture right>
/ items = ("<%values.right_presentation%>")
/ position = (80,50)
</picture>



Its works when i simply paste "picture1.bmp" as an item in picture however in my procedure I need to constantinous change pictures according to a set of a conditions therefore I would like to use a value wit migh be created in a start of each trial.

It is possible to use a values element in a picture item attribute?
Best


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
kulajw - Thursday, October 11, 2018
Hello,

I would like to use  a dynamically changing values element assigned to an item attributes in picture element, however I have an error:
Unable to initialize <picture right> item number 1. Verify the item exists and is correctly defined.

Let say this is a code illustrating my problem:

<values>
right_presentation = "picture1.bmp"
</values.>

<picture right>
/ items = ("<%values.right_presentation%>")
/ position = (80,50)
</picture>



Its works when i simply paste "picture1.bmp" as an item in picture however in my procedure I need to constantinous change pictures according to a set of a conditions therefore I would like to use a value wit migh be created in a start of each trial.

It is possible to use a values element in a picture item attribute?
Best


It's possible to do that, but:

#1: Your <values> element is misspecified (not sure if this is a copy and paste error or if it's in the actual script as well).

<values>
right_presentation = "picture1.bmp"
</values.>

needs to read

<values>
/ right_presentation = "picture1.bmp"
</values>

#2: More importantly, your script first needs to _know_ about the image files you are planning to use. You have to make them known to the script by adding a <picture> element to the script that has all the image files as items. You don't need to use that <picture> element for anything else, i.e. you don't need to display it in a <trial>, it just needs to be there.

Edited 6 Years Ago by Dave
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Dave - Thursday, October 11, 2018
kulajw - Thursday, October 11, 2018
Hello,

I would like to use  a dynamically changing values element assigned to an item attributes in picture element, however I have an error:
Unable to initialize <picture right> item number 1. Verify the item exists and is correctly defined.

Let say this is a code illustrating my problem:

<values>
right_presentation = "picture1.bmp"
</values.>

<picture right>
/ items = ("<%values.right_presentation%>")
/ position = (80,50)
</picture>



Its works when i simply paste "picture1.bmp" as an item in picture however in my procedure I need to constantinous change pictures according to a set of a conditions therefore I would like to use a value wit migh be created in a start of each trial.

It is possible to use a values element in a picture item attribute?
Best


It's possible to do that, but:

#1: Your <values> element is misspecified (not sure if this is a copy and paste error or if it's in the actual script as well).

<values>
right_presentation = "picture1.bmp"
</values.>

needs to read

<values>
/ right_presentation = "picture1.bmp"
</values>

#2: More importantly, your script first needs to _know_ about the image files you are planning to use. You have to make them known to the script by adding a <picture> element to the script that has all the image files as items. You don't need to use that <picture> element for anything else, i.e. you don't need to display it in a <trial>, it just needs to be there.

Here's a concrete example:

<values>
/ left_presentation = "00.jpg"
/ right_presentation = "00.jpg"
</values>

<block myblock>
/ trials = [1=mytrial]
</block>

<trial mytrial>
/ ontrialbegin = [
values.left_presentation = "01.jpg";
values.right_presentation = "02.jpg";
]
/ stimulusframes = [1=left, right]
/ validresponse = (57)
</trial>

<picture left>
/ items = ("<%values.left_presentation%>")
/ position = (30%, 50%)
</picture>

<picture right>
/ items = ("<%values.right_presentation%>")
/ position = (70%, 50%)
</picture>

//for loading purposes only
<picture all>
/ items = allpics
</picture>

<item allpics>
/ 1 = "00.jpg"
/ 2 = "01.jpg"
/ 3 = "02.jpg"
</item>



Attachments
experiment.iqx (465 views, 670 bytes)
00.jpg (471 views, 9.00 KB)
01.jpg (474 views, 7.00 KB)
02.jpg (428 views, 9.00 KB)
kulajw
kulajw
Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)
Group: Forum Members
Posts: 51, Visits: 256
Dave - Thursday, October 11, 2018
kulajw - Thursday, October 11, 2018
Hello,

I would like to use  a dynamically changing values element assigned to an item attributes in picture element, however I have an error:
Unable to initialize <picture right> item number 1. Verify the item exists and is correctly defined.

Let say this is a code illustrating my problem:

<values>
right_presentation = "picture1.bmp"
</values.>

<picture right>
/ items = ("<%values.right_presentation%>")
/ position = (80,50)
</picture>



Its works when i simply paste "picture1.bmp" as an item in picture however in my procedure I need to constantinous change pictures according to a set of a conditions therefore I would like to use a value wit migh be created in a start of each trial.

It is possible to use a values element in a picture item attribute?
Best


It's possible to do that, but:

#1: Your <values> element is misspecified (not sure if this is a copy and paste error or if it's in the actual script as well).

<values>
right_presentation = "picture1.bmp"
</values.>

needs to read

<values>
/ right_presentation = "picture1.bmp"
</values.>

#2: More importantly, your script first needs to _know_ about the image files you are planning to use. You have to make them known to the script by adding a <picture> element to the script that has all the image files as items. You don't need to use that <picture> element for anything else, i.e. you don't need to display it in a <trial>, it just needs to be there.


Thank you 
so if I understand this correctly  I only need to add a "dummy" picture element e.g as follows:

<picture dummy>
/ items =  ("picture1.bmp")     */ and all other pictures files
</picture>

<values>
right_presentation = "picture1.bmp"
</values>

<picture right>
/ items = ("<%values.right_presentation%>")
/ position = (80,50)
</picture>





kulajw
kulajw
Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)Guru (5.9K reputation)
Group: Forum Members
Posts: 51, Visits: 256
kulajw - Thursday, October 11, 2018
Dave - Thursday, October 11, 2018
kulajw - Thursday, October 11, 2018
Hello,

I would like to use  a dynamically changing values element assigned to an item attributes in picture element, however I have an error:
Unable to initialize <picture right> item number 1. Verify the item exists and is correctly defined.

Let say this is a code illustrating my problem:

<values>
right_presentation = "picture1.bmp"
</values.>

<picture right>
/ items = ("<%values.right_presentation%>")
/ position = (80,50)
</picture>



Its works when i simply paste "picture1.bmp" as an item in picture however in my procedure I need to constantinous change pictures according to a set of a conditions therefore I would like to use a value wit migh be created in a start of each trial.

It is possible to use a values element in a picture item attribute?
Best


It's possible to do that, but:

#1: Your <values> element is misspecified (not sure if this is a copy and paste error or if it's in the actual script as well).

<values>
right_presentation = "picture1.bmp"
</values.>

needs to read

<values>
/ right_presentation = "picture1.bmp"
</values.>

#2: More importantly, your script first needs to _know_ about the image files you are planning to use. You have to make them known to the script by adding a <picture> element to the script that has all the image files as items. You don't need to use that <picture> element for anything else, i.e. you don't need to display it in a <trial>, it just needs to be there.


Thank you 
so if I understand this correctly  I only need to add a "dummy" picture element e.g as follows:

<picture dummy>
/ items =  ("picture1.bmp")     */ and all other pictures files
</picture>

<values>
right_presentation = "picture1.bmp"
</values>

<picture right>
/ items = ("<%values.right_presentation%>")
/ position = (80,50)
</picture>





Thank you
 I didn't notice that you post a  detailed explanation as I was writing my reply ;).

Thanks for your help

BTW
use of values and picture elements is quite counterintuitive  maybe it will be good idea to add above description somewhere in to the Inquist help file




GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search