Values as an item in picture element ?


Values as an item in picture element ?

Author
Message
kulajw
kulajw
Esteemed Member
Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)

Group: Forum Members
Posts: 48, Visits: 242
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
Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)

Group: Administrators
Posts: 9.1K, Visits: 39K
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
Last Week by Dave
Dave
Dave
Supreme Being
Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)Supreme Being (489K reputation)

Group: Administrators
Posts: 9.1K, Visits: 39K
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 (4 views, 670 bytes)
00.jpg (6 views, 9.00 KB)
01.jpg (5 views, 7.00 KB)
02.jpg (3 views, 9.00 KB)
kulajw
kulajw
Esteemed Member
Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)

Group: Forum Members
Posts: 48, Visits: 242
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
Esteemed Member
Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)Esteemed Member (2.3K reputation)

Group: Forum Members
Posts: 48, Visits: 242
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 Wink.

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


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search