Millisecond Forums

Pass around pictures in a <values> property

https://forums.millisecond.com/Topic3960.aspx

By Blackadder - 2/21/2010

Hi Dave,


are you really sure this works? It would mean that Inquisit parses an item at startup, tests for each element whether it refers to an existing file, and if so, tries to load this file as a picture.


I've put together a sample experiment and attached it (don't bother about the picture selection, it's just for example purposes). The script won't compile because the <%values.currentpic%> isn't parsed as a variable but taken for a file name.


Did you really get something like this to work?



Malte.

By Dave - 2/21/2010

Sorry, Malte, you're right. I was writing from memory -- which isn't a particularly good idea because I have the memory span of an amoeba. With that said, indeed it will not work exactly as I outlined, but it still can be done (I have done so on multiple occasions). If you let me know your email address (via private message), I can shoot you a fully working example script (can't post this one publically). I'll also take the time to assemble a simple demo script which I'll post here in a few days or so.


Thanks,


~Dave

By Blackadder - 2/21/2010

Hello All,


to take Dave off his duties to assemble an example script, I've attached my clumsy first attempts on run-time picture passing. The script does nothing more than display a single stimulus per trial. The actual picture is drawn from one of two items and assigned to a "canvas" picture that serves the sole purpose of presenting any picture loaded into it. Not much, yet it illustrates everything you need to dynamically feed graphics into one single common picture element. All credit must be given to Dave.


Bye, Malte

By Dave - 2/21/2010

That's a nifty little script -- thank you very much for taking this off my shoulders!


~Dave