Variables and the script in OpenSesame
- I try to use inline script element to randomise the images in my exp with the following code:
img_list = glob.glob("/Exp/Imges_K/*.png")
The variable "img_list" exists, I can print it, I see it in the variable inspector, but if in the next sketchpad i try to use it as:
draw image center=1 file=[my_image_list] name=pic_1 scale=1 show_if=always x=0 y=0 z_index=0
I get the error, that such variable does not exist.
I've checked tutorials and tried also add it to inline script var.my_image_list = img_list and again call it from sketchpad, but I have the same error
What did I wrong?
- Could I get somehow python script that OpenSesame create? I mean, when I press the button "general script" it starts from "set" functions. I can't see which libraries are imported, and which functions are actually used. Is it possible to get somehow? Where does this parameters from the "set" function pass to?
Thank you so much for help!