Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Scripting button.notify(‘onClick’) doesn’t work

Return to Member Forum

  • Author
    Posts
    • #14332266

      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

    • #14332275

      I have been doing more tests, and I have found that notify(‘onClick’) works with a checkbox of the same GUI. Maybe it doesn’t work on buttons…

Viewing 1 reply thread
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads