1 Reply Latest reply on Apr 9, 2015 10:09 AM by Kai Rübsamen

    Search objects with different style name in text-frame

    brown1982 Level 1

      How is it possible to search in a 'continuous text frame' (main text-frame) objects (in this case text frames), that do not have a specific object-style name.

      For example: I have an object style "Box" and I want to search all object within the continuous-text-frame that does not have this object style name.

      If an object has another object style name or none, I would like to see this see this page, preferably selected also.


      Who could help me? Thanks in advance!

        • 1. Re: Search objects with different style name in text-frame
          Kai Rübsamen Level 4

          Try the following:


          if (app.selection[0].constructor.name == "InsertionPoint") {
              var curStory = app.selection[0].parentStory;
          else {
              alert ("Place the cursor inside your story!");
          var allAnchoredObjects = curStory.textFrames;
          for (var i = 0; i < allAnchoredObjects.length; i ++) {
                  var curObj = allAnchoredObjects[i];
                  if (curObj.appliedObjectStyle.name != "Box") {
                      app.activeWindow.zoomPercentage = 150;