PennController for IBEX › Forums › Support › Adding an F/J key instead of a YES/NO scale › Reply To: Adding an F/J key instead of a YES/NO scale
June 9, 2021 at 8:35 pm
#7052
UgurcanVurgun
Participant
Hi Jeremy,
I have just noticed that the result files show the selected keys as ‘undefined’. Do I have an error on the specific location of the setVar element? It seems like it doesn’t save the selection of the participant (A or L keys).
Thanks for your help.
Template("test.csv" , row => newTrial("test" , newVideo("eventTest", "https:" + row.VideoURL) .size(703,398) .disable(0.01) , newCanvas("testcanv",1366, 550) .add("center at 50%","center at 50%", getVideo("eventTest")) .center() .print() , newButton("testvideo","Play") .center() .print() .log() .wait() , getButton("testvideo") .remove() , getVideo("eventTest") .center() .play() .log() , getVideo("eventTest") .wait() , //Question1 newImage("Q1Image", "https:" + row.ImageURL1).size(703,398) , newText("Q1", "<p style=font-size:22px;>Did you see this image in the video?</p>") , newText("Q1instr","<strong>A: Yes</strong> <strong>L: No</strong>") , getCanvas("testcanv") .remove(getVideo("eventTest")) .add("center at 50%","middle at 50%", getImage("Q1Image")) .add("center at 50%",475, getText("Q1")) .add("center at 50%",525, getText("Q1instr")) , newKey("Q1resp", "AL") .wait() , newVar("TQ1") .set(getKey("Q1resp")) , newButton("Q1Submit", "Submit") .center() .print() , getButton("Q1Submit") .wait() .remove() , //Question2 newImage("Q2Image", "https:" + row.ImageURL2).size(703,398) , newText("Q2", "<p style=font-size:22px;>Did you see this image in the video?</p>") , newText("Q2instr","<strong>A: Yes</strong> <strong>L: No</strong>") , getCanvas("testcanv") .remove(getImage("Q1Image")) .remove(getText("Q1")) .remove(getText("Q1instr")) .add("center at 50%","middle at 50%", getImage("Q2Image")) .add("center at 50%",475, getText("Q2")) .add("center at 50%",525, getText("Q2instr")) , newKey("Q2resp", "AL") .wait() , newVar("TQ2") .set(getKey("Q2resp")) , newButton("Q2Submit","Submit") .center() .print() .wait() .remove() , //Question3 newImage("Q3Image", "https:" + row.ImageURL3).size(703,398) , newText("Q3", "<p style=font-size:22px;>Did you see this image in the video?</p>") , newText("Q3instr","<strong>A: Yes</strong> <strong>L: No</strong>") , getCanvas("testcanv") .remove(getImage("Q2Image")) .remove(getText("Q2")) .remove(getText("Q2instr")) .add("center at 50%","middle at 50%", getImage("Q3Image")) .add("center at 50%",475, getText("Q3")) .add("center at 50%",525, getText("Q3instr")) , newKey("Q3resp", "AL") .wait() , newVar("TQ3") .set(getKey("Q3resp")) , newButton("Q3Submit","Submit and Continue") .center() .print() .wait() .remove() , ).setOption("hideProgressBar",true) .log("ID", getVar("ID")) .log("Q1Response", getVar("TQ1")) .log("Q2Response", getVar("TQ2")) .log("Q3Response", getVar("TQ3")) .log("Group",row.Group) .log("Condition", row.Condition) .log("Item", row.Item) .log("Video", row.Video) .log("Source", row.Source) .log("Truncated", row.Truncated) .log("Image1", row.Image1) .log("CorrectResp1", row.CorrectResp1) .log("Image2", row.Image2) .log("CorrectResp2", row.CorrectResp2) .log("Image3", row.Image3) .log("CorrectResp3", row.CorrectResp3) )