PennController for IBEX › Forums › Support › Convert Var/Text to String for get-method › Reply To: Convert Var/Text to String for get-method
May 10, 2023 at 4:15 am
#10545
walch
Participant
Thanks a lot! It works! But if I now change the variable at the same time, it only works for the first button and not for any others. What is the reason for this?
getButton("B1") .callback( newFunction( ()=>{ try { getCanvas( getVar("canvasnr")._element.value ).visible()._runPromises(); setVar("canvasnr", C3); // set the value of canvasnr to 3 } catch (e) { } }).call() ), getButton("B2") .callback( newFunction( ()=>{ try { getCanvas( getVar("canvasnr")._element.value ).visible()._runPromises(); setVar("canvasnr", C4); // set the value of canvasnr to 3 } catch (e) { } }).call() ), getButton("B3") .callback( newFunction( ()=>{ try { getCanvas( getVar("canvasnr")._element.value ).visible()._runPromises(); setVar("canvasnr", C5); // set the value of canvasnr to 3 } // ...