5 Replies Latest reply on May 18, 2010 1:12 PM by Kathlene Ruhan

    Remove item by coordinates

    Kathlene Ruhan Level 3

      ID - CS3 OSX 10.5.3 MAC

       

      How would I go about adding to my script to select agrouped item by coordinates and delete?

        • 1. Re: Remove item by coordinates
          Kathlene Ruhan Level 3

          A few things I skipped over -  Applescript is the preferred - The coordinates are

          not the same on all documents. For instance, one may be 6p/34p while the next may be 5p11/35p0.578

           

          I have many documents I would like to script so I don't have to open each document to delete.

          • 2. Re: Remove item by coordinates
            Harbs. Level 6

            Well here's some JS code to get you pointed in the right direction:

             

            if(myPageItem.geometricBounds[0]>minimumCutoffNumber && myPageItem.geometricBounds[0]<maximumCutoffNumber){

            //it's within the correct vertical range

            myPageItem.remove();

            }

            • 3. Re: Remove item by coordinates
              Kathlene Ruhan Level 3

              Wish I could use this Harbs - I have an existing robust applescript that I am trying to add this function to.

               

              As of now, the script opens a 4 page INX file in CS3, edits text on all pages, creates 5 new text boxes and fills them with specified text, and goes into the save dialog. All I am missing is the chance to delete a set of grouped text on the first page and update the links. The grouped text I am trying to delete on all the files is in varying positions, but relatively the same (say a fraction of an inch in area off). A range of boundaries I think will be necessary, so I am fishing for something of the sort.

              • 4. Re: Remove item by coordinates
                L. Guy O'Rojo Level 2

                Hi:

                 

                I left the last msg here: <http://forums.adobe.com/message/1106634#1106634> about defining "zones" on a page and then measuring whether frame center coordinates were within your various defined zones. This helps when an unlabeled frame is "in the vicinity" but you don't know exactly what its edge bounds are.

                • 5. Re: Remove item by coordinates
                  Kathlene Ruhan Level 3

                  OK - here's the workflow on this one - One would have to script to ungroup the grouped items on such a page and delete the text boxes containing the text. There is one more part to this I have yet to figure. The grouped items included a colored header - now to isolate that (there are three identical on the page) and delete. HMPHHH - getting there..........