2 Replies Latest reply on Oct 5, 2015 12:29 PM by JBJgetAfield

    cannot use undefined my script to check if annotation was selected

    JBJgetAfield

      With the below script I'm trying to test if an annotation was selected, but I cannot get the typeof function to work properly. Can we check for an undefined object/variable within Acrobat javaScript environment?

       

      if(typeof this.selectedAnnots[0] != undefined)

             this.selectedAnnots[0].fillColor = color.red;

      else

        app.alert("please select an annotation before continuing")