lvanderlinden
About
- Username
- lvanderlinden
- Joined
- Visits
- 1,619
- Last Active
- Roles
- Administrator
Comments
-
Hi @gvh , thank you very much for sharing! :)
-
Hi @meto , Before answering: Will you be running your experiment online or locally? Cheers, Lotje
-
Perhaps you can write a little script to write the script... ;-)
-
Hi @zach_researcher , Indeed, you can't use the Mouse object in an inline_javascript item like you can in a Python inline_script. But you can use a mouse_response item and then use the resulting cursor_x and cursor_y variables in a subsequent inlin…
-
Hi @strahel , Me again. I think this script should work. Participants can use the arrow keys (left and right) to change the position of the cursor. To accept the final position, they can press enter. Then the next trial starts. Could you please ch…
-
Hi @strahel , Could you perhaps upload the experiment that you have so far? Cheers, Lotje
-
Hi @JasperdeWaard , Thanks for all your help on the forum! :) But no, sorry, I can't think of an easy solution to your question. (Assuming that you are using OSWeb and therefore can't make use of Canvas objects...) Maybe @sebastiaan or @eduard ? …
-
Hi @Vassilis , For someone who is new to programming you got quite far. :) To be able to calculate the duration of the keypress, you will also have to determine the time at which the key was pressed (instead of released) like so: # Get start time…
-
Hi @gmduma , I'm not sure what type of behaviour you want to implement exactly, but as a starter, you could create a variable that counts the number of pumps (as you suggested) and use this variable in the Break-if box of the corresponding loop ite…
-
Great to hear! :)
-
Ah, great to hear and thanks for sharing the solution :)
-
Hi Deiniol, Good to hear! And it's very nice to have you on the forum. Seems like you are making much progress in a short time. :) Cheers, Lotje
-
Hi @gvh, A first thing that comes to mind is that the variable is not yet set at the moment the sketchpad is called. Did you put your code in the Prepare tab (and not in the Run tab) of the inline_script preceding the sketchpad item? If this doesn'…
-
Great, thanks for sharing @Ergun !
-
Hi @Skilli , An obvious question perhaps, but did you put the PNG file(s) in the filepool? Otherwise, could you copy the console information here, like @JasperdeWaard suggests? (On a side note: I would set the duration of the feedback item to 0,…
-
Hi @favdberg , Am I correct in assuming that I can't call the 'items' function with Javascript? Yes, this is correct. See also here: https://osdoc.cogsci.nl/3.3/manual/osweb/osweb/#supported-functionality If yes, is there another way to program th…
-
Hi @meto, I think the gaze-cuing beginner tutorial will be a good start: https://osdoc.cogsci.nl/3.3/tutorials/beginner/ For collecting mouse clicks as responses, you can make use of the region-of-interest functionality: https://osdoc.cogsci.nl/3.…
-
Hi @Sannee , me again. To shuffle/ randomize you could do something like described here: https://forum.cogsci.nl/discussion/6854/help-with-converting-inline-python-to-java#latest
-
PS: On a side note: I think it's best to use (linked copies of) a single logger item throughout your whole experiment. Otherwise, you'll end up with multiple output files and things get messy. ;)
-
Hi @Skilli , I think something like the following should work: In an inline_javascript item at the beginning of your experiment, define a shuffle function: // Create a shuffle function: // See e.g. https://javascript.info/task/shuffle function Shu…
-
Hi @Ergun, It seems like there's nothing wrong with your experimental script itself. Could it be that there is something wrong with this specific stimulus (neg1_05.jpg)? For example that it is actually a PNG that is saved with the extension JPG? Wo…
-
Hi Sanne, I'm not an expert in JS myself yet, but in general I think there's the following rule of thumb: interaction between the GUI (sketchpads etc.) and the java_inlinescript is only possible by storing and retrieving variables with the vars.obje…
-
Hi @Lorraine , First, how could I set a variable in the javascript item and then can be assessed in later pages (such as sketchpad)? In an inline_javascript item you can store variables in the vars object, like so: vars.my_variable = "some_val…
-
Hi @Skilli , Looks good! :) If you reset the response variable before starting the second sequence, your script should work as desired: https://forum.cogsci.nl/uploads/399/UNS9062GHZ5S.png Cheers, Lotje
-
Hi @OmerBirka , Not sure whether I understand the design correctly, but doesn't it make sense to have a nested loop-sequence within the trial sequence, like so: https://forum.cogsci.nl/uploads/491/2CPHYBXLE3AS.osexp If this is not what you're loo…
-
Hi @Kassiopi , Thanks for your interest in OpenSesame and welcome to the forum! :) I think you could use something like the following structure. Note that OpenSesame is now waiting for a keypress after every word, so you'll have to change that to …
-
Hi @Cleo, I can't think of an easy solution for this, sorry. @sebastiaan or @eduard , do you have an idea? Cheers, Lotje
-
Hi @aha, Thanks for your interest in OpenSesame and welcome to the forum! :) A first question: will you be running your study online or locally? Cheers, Lotje
-
Hi @TIJ, response is a built-in variable, which is why the first script works. response2, on the other hand, is not. So you will first need to set response 2. You can do so by adding the following line to the beginning of your second inline_javascr…
-
Hi @KerAnn , I think you could do the following: Wrap a loop-sequence combination around your keyboard_response item Set the number of repetitions of this new loop to something very high, like 1000x Use the break-if statement of this loop to break …