Converting Inquisit 5 script to run on version 4


Author
Message
George Newman
George Newman
Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)
Group: Forum Members
Posts: 9, Visits: 26
Hey there. 

I've adapted a script using inquisit 5 and have just found out that we only have access to version 4 to run on the web. 

I saw from similar posts that I have to go trough manually and change out expressions. So I downloaded a different version of the ANT (for inquisit 4) to see where I should be going and it looks so different that I'm a bit lost were to start. Are there some obvious replacements i can make or would I be better off starting again with a version 4 script?

thanks



Attachments
MoralANT 09.11.18.iqx (536 views, 65.00 KB)
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
George Newman - Friday, November 16, 2018
Hey there. 

I've adapted a script using inquisit 5 and have just found out that we only have access to version 4 to run on the web. 

I saw from similar posts that I have to go trough manually and change out expressions. So I downloaded a different version of the ANT (for inquisit 4) to see where I should be going and it looks so different that I'm a bit lost were to start. Are there some obvious replacements i can make or would I be better off starting again with a version 4 script?

thanks



Instead of <parameters> you need to use <values>, Inquisit 4 syntax knows no <parameters> element. In the <data> and <summarydata> elements' /columns attributes, you need to use [ ], not ( ), in Inquisi 4.  /validresponse doesn't work with parameters or values in Inquisit 4, you need to use /isvalidresponse instead. So things like

<trial centercue>
...
/ validresponse = (parameters.responsekey_left, parameters.responsekey_right)
...
</trial>

need to be changed to

<trial centercue>
...
/ isvalidresponse = [trial.centercue.response == values.responsekey_left || trial.centercue.response == values.responsekey_right]
...
</trial>

Similarly,

<trial centercue>
...
/ response = timeout(values.target_duration)
...
</trial>

needs to be replaced with

<trial centercue>
...
/ timeout = values.fixation1_duration+values.cue_duration+values.ISI_cuetarget + values.target_duration
...
</trial>

There is no built-in clearscreen element in Inquisit 4, so you need to define a blank <shape> covering the entire screen instead.

<shape clearscreen>
/ shape = rectangle
/ color = white
/ size = (100%, 100%)
/ erase = false
</shape>


Finally, and probably most importantly, <list> elements in Inquisit 4 do not have mean, median, standarddeviation properties, so things like

<expressions>
/ overallACC = list.accuracy.mean * 100
/ meanRT_correct = list.latencies.mean

/ACCnocue = list.accuracy_nocue.mean*100
/ACCcentercue = list.accuracy_centercue.mean*100
/ACCspatialcue = list.accuracy_spatialcue.mean*100

/ meanRT_correctNoCue = list.latencies_nocue.mean
/ meanRT_correctCenterCue = list.latencies_centercue.mean
/ meanRT_correctSpatialCue = list.latencies_spatialcue.mean

/ACCcongruent = list.accuracy_congruent.mean*100
/ACCincongruent = list.accuracy_incongruent.mean*100

/ meanRT_correctCongruent = list.latencies_congruent.mean
/ meanRT_correctInCongruent = list.latencies_incongruent.mean
...
</expressions>

won't work. You need to sum up the latencies of interest in additional <values> instead and divide by the respective N to get those means.


Attachments
MoralANT 09.11.18.iqx (584 views, 65.00 KB)
George Newman
George Newman
Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)
Group: Forum Members
Posts: 9, Visits: 26
thanks for the quick reply, I'll get going with those. 

However,  I've run into another problem that i didn't expect. In inquisit 5 I could display text in a <likert> trail using an html element (which I had to do because I need portions of the text in bold) but now when I try to do the same thing the mouse cursor disappears and I don' seem to able to respond to the trial. I've added all the mouse based instructions to the code that i could find (although I didn't use any in version 5) but it still will only respond to keyboard input. However this only happens when the html element is used, it's fine when it's just the <text>. 

Any ideas what's going on there?






Attachments
mouse test.iqx (526 views, 661 bytes)
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
George Newman - Friday, November 16, 2018
thanks for the quick reply, I'll get going with those. 

However,  I've run into another problem that i didn't expect. In inquisit 5 I could display text in a <likert> trail using an html element (which I had to do because I need portions of the text in bold) but now when I try to do the same thing the mouse cursor disappears and I don' seem to able to respond to the trial. I've added all the mouse based instructions to the code that i could find (although I didn't use any in version 5) but it still will only respond to keyboard input. However this only happens when the html element is used, it's fine when it's just the <text>. 

Any ideas what's going on there?






Evidently a bug in Inquisit 4. Options for workarounds would be:

- Not using <html> in those <likert>s, for example use a screenshot of the HTML displayed via a <picture>.
- Not using <likert>, but standard <trial> elements acting like likerts (cf. https://www.millisecond.com/download/library/v2/CustomLikert/customlikert.zip ).


George Newman
George Newman
Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)
Group: Forum Members
Posts: 9, Visits: 26
Hey again

So the custom <trial> work-around runs into similar (but not the same) problem. It won't display the response buttons at the same time as the html (although it does display the cursor). If I set the stimulusframes of the html to 100, for example, then what happens is the scale is displayed until the html appears, at which point it disappears. Is this still the same bug?

As to the screen shot, that works fine (thank you) but I'm not sure about will happen when it is displayed on screens of different sizes. Will it scale? I'm worried that it might end up cutting off some of the words, or covering the question text or even possibly the response buttons below. Is there anyway I can guarantee that this sort of thing won't happen?

Thanks again.
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
George Newman - Friday, November 16, 2018
Hey again

So the custom <trial> work-around runs into similar (but not the same) problem. It won't display the response buttons at the same time as the html (although it does display the cursor). If I set the stimulusframes of the html to 100, for example, then what happens is the scale is displayed until the html appears, at which point it disappears. Is this still the same bug?

As to the screen shot, that works fine (thank you) but I'm not sure about will happen when it is displayed on screens of different sizes. Will it scale? I'm worried that it might end up cutting off some of the words, or covering the question text or even possibly the response buttons below. Is there anyway I can guarantee that this sort of thing won't happen?

Thanks again.

Re. the <picture> approach, scaling across different screen sizes should not be an issue if you make use of /canvasaspectratio in the respective script's <defaults> and use percentages in /size and /position attributes.

Re. the <trial> issue, I seem to be unable to reproduce this one, but I don't have your HTML file. The attached example works fine for me in Inquisit 4.

Attachments
example.zip (336 views, 74.00 KB)
George Newman
George Newman
Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)
Group: Forum Members
Posts: 9, Visits: 26
Huh. That seems to work (even when plug my harmint.htm)! Still can't see where I went wrong in my code but I'm happy for that to be one of life's little mysteries! Thank you very much. I will proceed using this method. One last thing, is there a template for this exact thing but with a 7 point scale? I'm struggling to make a pictures that add on the extra two points i need. 

Thanks again for all your help.


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
George Newman - Sunday, November 18, 2018
Huh. That seems to work (even when plug my harmint.htm)! Still can't see where I went wrong in my code but I'm happy for that to be one of life's little mysteries! Thank you very much. I will proceed using this method. One last thing, is there a template for this exact thing but with a 7 point scale? I'm struggling to make a pictures that add on the extra two points i need. 

Thanks again for all your help.


No, there isn't a pre-made 7-point sample that I''m aware of. Extending the existing one to 7 points should be straightforward, though, what exactly are you struggling with?

George Newman
George Newman
Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)Partner Member (827 reputation)
Group: Forum Members
Posts: 9, Visits: 26
Apologies you, were right. It was straightforward. I was just being mildly stupid. 

Just out of interest, what determines which element appears in front of which? because it seems that this set up works because the buttons, b1, b2 etc, are layered on top of the scale.jpg but i can't see that explicitly in the code anywhere? If I could layer some elements in-front i might be able to do it with the original scale.

Thanks again.
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
George Newman - Thursday, November 22, 2018
Apologies you, were right. It was straightforward. I was just being mildly stupid. 

Just out of interest, what determines which element appears in front of which? because it seems that this set up works because the buttons, b1, b2 etc, are layered on top of the scale.jpg but i can't see that explicitly in the code anywhere? If I could layer some elements in-front i might be able to do it with the original scale.

Thanks again.

The order in /stimulustimes or -frames determines what is drawn on top of what, see https://www.millisecond.com/forums/FindPost26096.aspx

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search