Cuando llamo a la función desde un botón, el proceso funciona sin problema, pero al llamar a la función desde el script de carga, la función falla.
function MyFunction () { var sms=new ActiveXObject("WScript.Shell"); var vStrMapID = new Array (); var ArrayId = new Array (); var k,z; z = 3; for ( k=1; k<=z; k++) { vStrMapID = "vArray_" + k; sms.popup(vStrMapID); ArrayId [k] = ActiveDocument.GetVariable(vStrMapID).GetContent().String; sms.popup(ArrayId [k]); } return 5;
}
adjunto el código del script de carga, desde donde llamo a la función
for a = 1 to 3 let vArray_$(a) = 'Valor_'& $(a); next
let MiValor = MyFunction();
¿Alguien sabe por que puede estar fallando?
Gracias!
Hello, I have the following problem for which after a long time, I cannot find a solution.
I have a function(jscript), in which I load data by calling a variable of my data model
When I call the function from a button, the process works fine, but when I call the function from the load script, the function fails.
function MyFunction () { var sms=new ActiveXObject("WScript.Shell"); var vStrMapID = new Array (); var ArrayId = new Array (); var k,z; z = 3; for ( k=1; k<=z; k++) { vStrMapID = "vArray_" + k; sms.popup(vStrMapID); ArrayId [k] = ActiveDocument.GetVariable(vStrMapID).GetContent().String; sms.popup(ArrayId [k]); } return 5;
}
I attach the code of the load script, from where I call the function
for a = 1 to 3 let vArray_$(a) = 'Valor_'& $(a); next