Hi mates!
I’m finnishing a script and I have found a duplicated chunk of code, associated to a single button onClick function. I’m trying to use button.notify(‘onClick’) call from the second function (a normal one, not onClick) but it doesn’t work. Not error message, neither. It’s only… there.
I have been looking for info in the web and I have found only this
https://www.davidebarranca.com/2013/08/extendscript-scriptui-events-call-notify-dispatchevent/
I have tried what David says there but I have not results at all.
Some advice or clue to make it work, mates? If not, I’ll leave the duplicated code in the scripts. It works, but it’s not elegant at all.
button_ayuda_1.onClick = function() {
// botón ayuda plantillas
var texto_ayuda_plantilla = ‘El documento debe tener el tamaño final, y además se\r’ +
‘pueden utilizar páginas maestras para datos e imagen.\r’ +
‘Los marcos que deseemos usar en el calendario deben\r’ +
‘tener alguna de las siguientes etiquetas:\r\r’;
alert(texto_ayuda_plantilla, ‘Plantilla’);
return;
}; // fin button_ayuda_1.onClick
function no_plantilla() {
button_ayuda_1.notify(‘onClick’);
return;
} // fin no_plantilla
Thanks in advance, mates!
Best regards,
Jose