Welcome! Log In Create A New Profile

Advanced

Randomly choosing pictures

Posted by dianaaa 
Randomly choosing pictures
November 05, 2019 09:45PM
Hi there,

I am coding a DMS task, and would like monkeylogic to randomly select pictures and positions to present them. If I was to write this in the conditions file framework, there would be unlimited combinations that would make it very difficult. Is there a way for the task to randomly select say a picture "A" from a sample folder or randomly select in which location to present the stimuli? Either or both of these would be very helpful.

Thanks,
Diana
Re: Randomly choosing pictures
November 05, 2019 10:31PM
Use the userloop function.
https://monkeylogic.nimh.nih.gov/docs_CreatingTask.html#Userloop

There are a few example tasks under the task\userloop directory, too.
Re: Randomly choosing pictures
November 12, 2019 05:28PM
Thank you! I figured it out using the instructions you provided there, it was very useful.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.