nonamenick
|
|
Group: Awaiting Activation
Posts: 20,
Visits: 100
|
So I wrote the script for my experiment in Inquisit 4 but for the purpose of the lab it must also be compatible with Inqusist 3. After opening my experiment in Inquisit 3, I get a number of errors regarding the pictures I have in the script.
It has trouble finding them, however, it works fine in Inqusit 4. All the pictures are in .jpg form and are located in the same file as the experiment.
Here is an example of some script:
<picture risk_slides> /items = ("1#5#13.jpg","1#8#13.jpg","1#20#13.jpg","1#50#13.jpg","1#125#13.jpg", "1#5#25.jpg","1#8#25.jpg","1#20#25.jpg","1#50#25.jpg","1#125#25.jpg", "1#5#38.jpg","1#8#38.jpg","1#20#38.jpg","1#50#38.jpg","1#125#38.jpg", "1#5#50.jpg","1#8#50.jpg","1#20#50.jpg","1#50#50.jpg","1#125#50.jpg", "1#5#75.jpg","1#8#75.jpg","1#20#75.jpg","1#50#75.jpg","1#125#75.jpg",) / size = (82%, 82%) / select = list.slidevalues.currentindex </picture>
There are a few of these item lists for different pictures. There are also errors involving the list.slidevalues.currentindex, however, I think that is just an issue with the program not being able to find the pictures.
Any help would be much appreciated.
Thanks
Nick
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
There are no <list> elements in Inquisit 3 syntax. <list> elements were introduced in Inquisit 4. You need to replace them with the Inquisit 3 predecessor: <counter> elements.
|
|
|
nonamenick
|
|
Group: Awaiting Activation
Posts: 20,
Visits: 100
|
Oh. Ok. I use the list function quite a bit. I use it to pair up two different numbers with each picture (A winning amount and a winning percentage)
<list slidevalues> / items = (5,8,20,50,125,5,8,20,50,125,5,8,20,50,125,5,8,20,50,125,5,8,20,50,125) /selectionmode = random </list>
<list slideprob> / items = (13, 13, 13, 13, 13, 25, 25, 25, 25, 25, 38, 38, 38, 38, 38, 50, 50, 50, 50, 50, 75, 75, 75, 75, 75) /selectionmode = list.slidevalues.currentindex </list>
I could not find anything on counters in the language reference, and simply replacing all the "list" language with counters did not work. Is there a certain way to pair these numbers with these pictures using the counter function?
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 104K
|
<counter> elements are covered in the Inquisit 4 language reference in the Inquisit 4 documentation; a better place to look is the Inquisit 3 documentation. I would in addition recommend (re-)writing / modifying your script using Inquisit 3 if that's the version you are ultimately going to use / collect data with. In addition, hundreds of examples using <counter> elements are available in the Inquisit 3 section of this forum: https://www.millisecond.com/forums/Forum12.aspxThe equivalent to <list slidevalues> / items = (5,8,20,50,125,5,8,20,50,125,5,8,20,50,125,5,8,20,50,125,5,8,20,50,125) /selectionmode = random </list> <list slideprob> / items = (13, 13, 13, 13, 13, 25, 25, 25, 25, 25, 38, 38, 38, 38, 38, 50, 50, 50, 50, 50, 75, 75, 75, 75, 75) /selectionmode = list.slidevalues.currentindex </list> would be <counter slidevalues> / items = (5,8,20,50,125,5,8,20,50,125,5,8,20,50,125,5,8,20,50,125,5,8,20,50,125) / select = noreplace </counter> <counter slideprob> / items = (13, 13, 13, 13, 13, 25, 25, 25, 25, 25, 38, 38, 38, 38, 38, 50, 50, 50, 50, 50, 75, 75, 75, 75, 75) / select = current(slidevalues) </counter> with <trial sometrial> / ontrialbegin = [values.s_value = counter.slidevalues.selectedvalue; values.s_prob = counter.slideprob.selectedvalue; ] ... </trial> <values> / s_value = 0 / s_prob = 0 </values> to sample items from the two counters. I've laid out the most important differences between Inquisit 4 and 3 syntax, including what you need to change to go from 4 to 3, throughout various threads. See e.g. https://www.millisecond.com/forums/Topic16606.aspx and https://www.millisecond.com/forums/Topic15587.aspx#bm15588 .
|
|
|
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!
|
|
|
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
|
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
|
> 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
|
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
|
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>
|
|
|