old function does not work in new version of opensesame
Hi, i am trying to use a old script made on opensesame 3.2.8 with the new version opensesame 4.0.13
Unfortunately, there is a function that now does not work. I want to ask if you know how i might substitute it to make it work again.
The functions is self.copy_sketchpad . These are the line of script where i used it:
import random
import time
my_keyboard = Keyboard(keylist=['a', 'l'])
my_keyboard.flush()
start_time = time.time()
outcome_duration = 1000
from openexp.canvas import canvas
var.low=20.0 #starting value
var.high=40.0 #starting value
for i in [10,5,2.5,1.5,0.5] :
my_canvas = self.copy_sketchpad('ITI')
my_canvas.show()
self.sleep(1000)
my_keyboard.flush()
my_canvas = self.copy_sketchpad('decision')
my_canvas.text(var.low, center=False, x=-308, y=-180, font_size=48, z_index=0)
my_canvas.show()
I tried to use import copy and copy.copy, but this can't allow to use the subsequent "my_canvas.show()
Thanks in advance!
Comments
Hi @Luigi96 ,
The function is now simply available as
copy_sketchpad(), so without theself.prefix. See also:Hope this helps!
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thank you! Now it works