Disappearing code
Code I type into the script of a sketchpad disappears when I leave the sketchpad item. For example,
A. first, in the sketchpad I type the four lines
set duration "[duration]" set description "Displays experimental stimuli" var.left_file = "BM10Neutral.png" draw image center=1 file="[left_file]" scale=1 show_if=always x=-288 y=-192 z_index=0
B. Then I click on "Apply and close". If I select "View script" the four lines are still there.
C. If I click on a different item in the Overview pane and then click back on the sketchpad item in that pane, the third line is no longer there, i.e., the three lines in the sketchpad script are:
set duration "[duration]" set description "Displays experimental stimuli" draw image center=1 file="[left_file]" scale=1 show_if=always x=-288 y=-192 z_index=0
If I try to run the experiment it fails saying that left_file does not exist (of course).
Saving the experiment file after pressing "Apply and close" does not help - the problem remains.
I'm running OpenSesame 3.2.8 on Windows 10.
Any suggestions? This may be related to the problem described at
which doesn't seem to have been resolved.
Thanks.
Greg Reese
Comments
Hi Greg,
The issue here is that you're mixing two different languages: OpenSesame script and Python.
sketchpad, you're looking at OpenSesame script.inline_scriptitem.You're typing Python script where OpenSesame excepts OpenSesame script. This is invalid, and the Python script is therefore removed again. Does that make sense?
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thanks Sebastiaan. I'll give it a try.
Greg Reese