Forum Replies Created
-
AuthorPosts
-
aliona
ParticipantHi Jeremy,
it worked out perfectly! Thanks for the help.
Aliona
aliona
ParticipantOh, I see! Thanks a lot for the link!
Best,
Alionaaliona
ParticipantDear Jeremy,
thanks for getting back to me!
I was hoping I could use those lines too, but in some cases several browsers are listed and I wasn’t sure how to interpret that.`USER AGENT: Mozilla/xx (xxxxxxxxx) xxxxxx (xxxxxxxx) Chrome/xxxxxxx Safari/xxxxxxx Edg/xxxxxxx
I guess this is then the case of the info not being 100% reliable.
Best,
Alionaaliona
ParticipantHi Jeremy,
I was wondering if there is a way to prevent the dashed function from deviding the chunks and presenting them on different lines? So if there’s not enough space for the whole sentence region on the first line, the presentation starts from the second line. Also right now it happens sometimes that you move your gaze to the next line thinking the next word will apear there, but then another word is added to the previous line:
Jeremy surely know how to solve
——-
Jeremy surely knows how to solve this
problem.Is there an easy fix for it?
Thanks a lot!
AlionaHere’s my function:
// create cumulative function cumulative = (sentence, remove) => { let words = sentence.split('*'), blanks = words.map(w=>w.split('').map(c=>'_').join('') ); // 'sentence.split('*')' = '*' defines the chunk boundaries (in the .csv) let textName = 'cumulative'+words.join(''); // We'll return cmds: the first command consists in creating (and printing) a Text element with dashes let cmds = [ newText(textName, blanks.join(' ')) //.print() .settings.css("font-family","courier") .settings.css("font-size", "20px") .cssContainer({"width": "80vw"}) .print("10vw","50vh") //.settings.css("font-size", "0.5em") //.cssContainer({"width": "10vw"}) ]; // COURIER as font // We'll go through each word, and add two command blocks per word for (let i = 0; i <= words.length; i++) cmds = cmds.concat([ newKey('cumulative'+i+'_'+words[i], " ").log().wait() , // Wait for (and log) a press on Space; will log "cumulative"+number-of-region_sentence-chunk getText(textName).text(blanks.map((w,n)=>(n<=i?words[n]:w)).join(' ')) ]); // Show word; to make cumulative changed n==i?words to n<=i?words (print words less than or equal to i-region) if (remove) // Remove the text after the last key.wait() is parameter specified cmds.push(getText(textName).remove()); return cmds; };
aliona
ParticipantHi Jeremy,
it works perfectly! Thanks a lot for your help and all the great work on PC!
Aliona
aliona
ParticipantHi Jeremy,
would it be possible to use the above mentioned SepWithN function while having different number of critical and filler items? In our experiment we have 20 criticals and 30 fillers devided into three blocks by 2 breaks (7/7/6 +10 fillers/block).
My sequence looks like this:
PennController.Sequence(…sepWithN(“break” , rshuffle(“critical_trials”, “fillers”) , 17 )…);How can I specify the number of the critical items and fillers/block? I tried adding the desired numbers after “critical_trials” and “fillers” in the sequence but that didn’t work, the proportion of criticls and fillers is still random.
Thanks in advance for your responce!
Aliona -
AuthorPosts