Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
> Does something involving the win.value need to go into the storedwinnings item?
I cannot answer this question but you should be able to. You wrote the original Inquisit 4 code that used those <item> elements and that should tell you where they were used and what for.
All I can say is that you have a <text> element
<text payout> / items = storedwinnings / select = current(endslide) </text>
<item storedwinnings> </item>
that references <item storedwinnings> and that the selection in the <text> element depends on the selection in "endslide". If you don't ever add any items to <item storedwinnings>, it obviously cannot display anything.
|
|
|
nonamenick
|
|
Group: Awaiting Activation
Posts: 20,
Visits: 100
|
Ok, I changed the select so that it is it is the text payout that is selecting the endslide instead of the opposite way. The trial number is coming up using this <%text.payout.currentitemnumber%>.
The only thing still not showing up is storedwinnings. After each trial is changes the win value to either 0, 5, or a win amount depending on the outcome of the lottery.
I don't have anything for storedwinnings in the trial script.
<trial fixedtrial> / ontrialbegin = [values.probamount=counter.slidevalues.selectedvalue; values.prob=counter.slideprob.selectedvalue; values.win=0; ] / ontrialbegin = [values.randomnumber = rand(0,100); ] / ontrialbegin = [picture.risk_slides] / ontrialend = [if (trial.fixedtrial.response=="3") {values.win=values.fixedamount; }; ] / ontrialend = [if (trial.fixedtrial.response=="1" && values.prob >= values.randomnumber) {values.win=values.probamount; }; ] / ontrialend = [if (trial.fixedtrial.response=="1" && values.prob < values.randomnumber) {values.win=0; }; ] / ontrialend = [item.endslide.item = picture.risk_slides.currentitem] / stimulusframes = [1=3, 1, risk_slides] / inputdevice = mouse / response = timeout(10000) / validresponse = (3, 1) / posttrialpause = 500 </trial>
and was wondering if it had to be in there or if the value gets stored with the item.endslide
<text payout> / items = storedwinnings / select = current(endslide) </text>
<text trialmsg> / items = ("which is the amount you won in trial #<%text.payout.currentitemnumber%>.") / position = (50%, 60%) </text>
<item storedwinnings> </item>
Does something involving the win.value need to go into the storedwinnings item?
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
The code is too incomplete to say anything specific. Note that the selection in your <picture> element is set to depend on the selection in some other element:
<picture endslide> / items = endslide / select = current(payout) / size = (50%,50%) / position = (50%,55%) </picture>
For this to make sense, the selection in the "payout" element has to happen *before* you ever try to display the <picture>. That would be a good place to start looking for your error.
|
|
|
nonamenick
|
|
Group: Awaiting Activation
Posts: 20,
Visits: 100
|
Thank you, the experiment is running however, it is appending only the first item and not a random trial. And on the payout page, it is saying that trial number picked at random is trial 1 and it does not show the payout. I'm not sure if its a problem with the script in the trials above or an error with the trials for the payout page that i've posted here.
<trial chosenslide> /stimulusframes = [1=endslide] /inputdevice = keyboard /validresponse = ("q") </trial>
<picture endslide> / items = endslide / select = current(payout) / size = (50%,50%) / position = (50%,55%) </picture>
<trial payouttrial> / stimulusframes = [1=payoutmsg, payout, trialmsg] /inputdevice = keyboard / validresponse = ("q") </trial>
<text payoutmsg> / items = ("Your payout is") / position = (50%, 40%) </text>
<text payout> / items = storedwinnings </text>
<text trialmsg> / items = ("which is the amount you won in trial #<%text.payout.currentitemnumber%>.") / position = (50%, 60%) </text>
<item storedwinnings> </item>
<item endslide> </item>
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
Inquisit 3 syntax does not have object- or member-functions.
The equivalent to
<trial fixedtrial> ......... / ontrialend = [item.endslide.appenditem(picture.risk_slides.currentitem)] ........ </trial>
would simply be
<trial fixedtrial> ......... / ontrialend = [item.endslide.item = picture.risk_slides.currentitem] ........ </trial>
|
|
|
nonamenick
|
|
Group: Awaiting Activation
Posts: 20,
Visits: 100
|
Thank you! That was very frustrating but I was able to export the pictures into a jpg format and the program now runs on Inquisit 3.
The final issue I'm having with the transition is involving appending an item. I couldn't find anything involving the language for Inquisit 3 and wasn't sure about how to go about handling it.
what I have right now looks like this
<trial fixedtrial> ......... ......... / ontrialend = [item.endslide.appenditem(picture.risk_slides.currentitem)] ........ </trial fixedtrial>
<trial payouttrial> / stimulusframes = [1=payoutmsg, payout, trialmsg] / validresponse = (57) </trial>
<block payoutblock> / trials = [1=chosenslide; 2=payouttrial] </block>
<text payoutmsg> / items = ("Your payout is") / position = (50%, 40%) </text>
<text payout> / items = storedwinnings </text>
<text trialmsg> / items = ("which is the amount you won in trial #<%text.payout.currentitemnumber%>. ") / position = (50%, 60%) </text>
<item storedwinnings> </item>
<trial chosenslide> /stimulusframes = [1=endslide,chosentext, spacebar] /inputdevice = mouse /validresponse = (spacebar) </trial>
<text chosentext> / items = ("This trial was picked at random. Continue to see what you won!") /fontstyle = ("Arial", 4%) / position = (50%, 20%) </text>
<picture endslide> / items = endslide / select = current(payout) / size = (50%,50%) / position = (50%,55%) </picture>
<item endslide> </item>
The purpose of this is to randomly select a single trial from the experiment and recall the picture of the trial, their response, and how much they won. If it is easier, I would not be opposed to simply recalling a random trial and having them complete the single trial again to determine what they have won.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
> I have moved them to a PC and changed the extension (.png to .jpg)
There's your problem. Changing a file's *extension* does not change the file's *format*. A PNG with a JPG extension is still a PNG, just like a Word DOC with a PDF extension is still a Word Document which no PDF reader will open: Changing the extension does not magically transform the file into something else.
Inquisit 3 does not support PNGs. What you need to do is open the PNGs in your preferred image editor and *convert* them to JPG, usually via FIle -> Save As...
|
|
|
nonamenick
|
|
Group: Awaiting Activation
Posts: 20,
Visits: 100
|
I'm still having an issue loading these pictures.
I have made sure to save it as a .exp, and I have tried testing it with other pictures and those are working fine, its only the picture files I need that are not working. Originally these files were used on a Mac for Inqusisit 4. I have moved them to a PC and changed the extension (.png to .jpg). It seems like there is something wrong with the picture properties. I have tried many different options but I can't seem to get these photos to load.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
> /items: Unable to load the picture 'H:\Test Expmnt\1#5#13.jpg'.
The file name referenced in the above error message is not anywhere among those referenced in the <picture> element & associated <item> element, so my assumption would be that error pertains to a different <picture> element in your script. It may also be that you are running into some kind of encoding issue (Inquisit 4 is a Unicode application and its files are encoded in UTF-8; Inquisit 3 is *not* a Unicode application, and it expects files to be encoded according to your system's codepage). Before transitioning to Inquisit 3, make sure to save your script in the legacy *.exp format via File -> Save As... in Inquisit 4.
Beyond that, no, there is no difference between Inquisit 3 and 4 in terms of loading and handling images.
|
|
|
nonamenick
|
|
Group: Awaiting Activation
Posts: 20,
Visits: 100
|
Thank you. These changes have been working so far (I'm going through it slowly section by section), however, one problem keeps on occurring. The program is not finding my pictures.
/items: Unable to load the picture 'H:\Test Expmnt\1#5#13.jpg'. Verify that the file exists and is of a supported format.
This is the error I keep on getting. The pictures are in jpg format and are located in the same file as the .exp file.
I've haven't been able to find anything about errors loading pictures. Is there a specific way to organize pictures in the script for Inquisit 3 vs. Inquisit 4?
Should the pictures have their own item script and then have the picture script select them like this:
<picture ptask1picture> / items = ptask1items / select = sequence(1,2,3,4) /size = (792px, 612px) </picture>
<item ptask1items> /1 = "Breakfast.jpg" /2 = "Rollercoaster.jpg" /3 = "WrongWay.jpg" /4 = "Detergent.jpg" </item>
or is it fine the way I had it shown above?
Thanks as always!
|
|
|