3 Replies Latest reply on Sep 24, 2014 7:58 AM by Math Kay

    meaning of "undefined" in script

    Math Kay Level 1

      Hi,

       

      I am beginner to scripting. Generally, what does undefined mean in script. please explain in detail.

       

      for example, in this script:

       

      var myDocument = app.documents.add();
      var myPageWidth = myDocument.documentPreferences.pageWidth;
      var myPageHeight = myDocument.documentPreferences.pageHeight;
      with(myDocument.pages.item(0)){
      //Place guides at the margins of the page.
      guides.add(undefined, {orientation:HorizontalOrVertical.vertical, <lb>
      location:marginPreferences.left});
      guides.add(undefined, {orientation:HorizontalOrVertical.vertical, <lb>
      location:(myPageWidth - marginPreferences.right)});
      guides.add(undefined, {orientation:HorizontalOrVertical.horizontal, <lb>
      location:marginPreferences.top});
      guides.add(undefined, {orientation:HorizontalOrVertical.horizontal, <lb>
      location:(myPageHeight - marginPreferences.bottom)});
      //Place a guide at the vertical center of the page.
      guides.add(undefined, {orientation:HorizontalOrVertical.vertical, <lb>
      location:(myPageWidth/2)});
      //Place a guide at the horizontal center of the page.
      guides.add(undefined, {orientation:HorizontalOrVertical.horizontal, <lb>
      location:(myPageHeight/2)});
      }