Problem: cmi.suspend_data js
ActivePresenter Version: 7.3.2
OS: OSX
Notes:
Greetings, the problem is that when recording inside the variable “cmi.suspend_data” at the moment it seems to me that the data is saved correctly. but when closing the window and resuming the content, “cmi.suspend_data” returns other data that is not what I saved in said variable.
How do I save the variable:
var bufer3="false/false/false/false/false/false/false/false/false/false/false/false";
doLMSSetValue("cmi.suspend_data", bufer3);
console.log(doLMSGetValue("cmi.suspend_data"));
How do I recover the data
var sdata = doLMSGetValue("cmi.suspend_data");
if(!sdata || sdata == null || sdata.length == 0 || sdata=="" ) {
console.log("Nulo");
}
else{
console.log("suspendata="+sdata);
}
and it returns the following string:
“suspendata=eyJtYXAiOnt9LCJpbmZvIjp7InNsaWRlcyI6W3t9LHt9LHt9LG51bGwsbnVsbCxudWxsLG51bGwse30se30se30se30se30se30se30sbnVsbCx7fSxudWxsLHt9LHt9XSwicmFuZG9tTWFwIjp7fSwiaW5kZXgiOjE4LCJ0cyI6NjA4NiwiZWxhcHNlZFRpbWUiOjMzMzExMn0sIm5leHRJZHgiOjB9”
When it should be:
“suspendata=false/false/false/false/false/false/false/false/false/false/false/false”
Saludos, el problema radica en que al grabar dentro de la variable “cmi.suspend_data” al momento me parece que el dato se guarda correctamente. pero al cerrarla ventana y reanudar el contenido , “cmi.suspend_data” me devuelve otros datos que no son lo que guarde en dicha variable.
Como guardo la variable:
var bufer3=“false/false/false/false/false/false/false/false/false/false/false/false”;
doLMSSetValue(“cmi.suspend_data”, bufer3);
console.log(doLMSGetValue(“cmi.suspend_data”));
Como recupero los datos.
var sdata = doLMSGetValue(“cmi.suspend_data”);
if(!sdata || sdata == null || sdata.length == 0 || sdata=="" ) {
console.log(“Nulo”);
}
else{
console.log(“suspendata=”+sdata);
}
y me devuelve la siguiente cadena : “suspendata=eyJtYXAiOnt9LCJpbmZvIjp7InNsaWRlcyI6W3t9LHt9LHt9LG51bGwsbnVsbCxudWxsLG51bGwse30se30se30se30se30se30se30sbnVsbCx7fSxudWxsLHt9LHt9XSwicmFuZG9tTWFwIjp7fSwiaW5kZXgiOjE4LCJ0cyI6NjA4NiwiZWxhcHNlZFRpbWUiOjMzMzExMn0sIm5leHRJZHgiOjB9”
Cuando deveria ser:
“suspendata=false/false/false/false/false/false/false/false/false/false/false/false”