3 Replies Latest reply on Jul 13, 2009 5:51 AM by தமிழரசன் ( Thamilarasan)

    ID-CS4 [JS] - How to get all Pasteboard Items.

    Adobe-InDesign CS4 Level 1

      Dear All,

       

        I'm having the doubt regarding for getting all items in the "PASTEBOARD AREA".

       

      Here in my InDesign file have some more Pastebord Items, So I want to Delete / Show the messgae in to the users.

       

      So I need the help to get Itemsall pasteboard  in the Open InDesign file....

       

      Please any one can help me!, for solving the above problem

       

       

      Thanks & Regards

      T.R.Harihara SudhaN

        • 1. Re: ID-CS4 [JS] - How to get all Pasteboard Items.
          Harbs. Level 6

          if(item.parent instanceof Spread){

             //it's on the pasteboard of a regular page

          }

           

          Harbs

          • 2. Re: ID-CS4 [JS] - How to get all Pasteboard Items.
            Adobe-InDesign CS4 Level 1

            Dear Harbs,

             

            Many Thanks for this quick response.

             

            But, still I'm getting some problem...

             

             

            Here My Script:

             

            var myDoc  = app.activeDocument;

             

            var myPages = myDoc.pages;

            var myTextFrames;

             

            for(var i=0; i<myPages.length; i++)

            {

              myTextFrames = myPages[i].textFrames;

              for(j=0; j<myTextFrames.length; j++)

               {

                     if(myTextFrames[j].parent instanceof Spread)

                      {

                           $.writeln(myTextFrames[j]);

                     }

                }

            }

             

            /--------------------------------------------------- End of the Script -----------------------------------------------------------------------//

             

             

            It showing object TextFrames.....

             

             

            Dear Harbs, Here I clearly explained below...

             

             

            In the InDesign file, First Page - Pasteboard area having 2 Figures

             

            Second Page - Pasteboard Area having 1 Tables

             

            Third Page - Pasteboard Area having some dummy [with out] text Frames.

             

             

            I would like to show the message to the user, First Page -> xx figures

            Second page -> xx ..

            Third Page -> xx

             

            thats all..

             

            So please I need your helps, comments and clarification...

             

            Thanks & Regards

            T.R.Harihara SudhaN

            • 3. Re: ID-CS4 [JS] - How to get all Pasteboard Items.
              தமிழரசன் ( Thamilarasan)

              Hi Hari

               

              ///////// myTextFrames = myPages[i].textFrames; /////

               

              this line gets only textFrames available in pages[i]; so u will not get pasteboard items. to do that u can use "spreads[]" instead of "pages[]".

              And u've to get "pageItems" not textFrames. Finally u can differentiate those using its constructor name.