1 Reply Latest reply on Feb 15, 2012 2:31 PM by OliverJohn

    How do I use the find method to search for character and pgf format overrides?

    jaloren28 Level 2

      I strongly suspect that I should be able to use the find method to search for paragraph and format overrides since those options are available in the find dialog box. However, due to Adobe's atrocious Extendscript documentation, I haven't been able to find the key pieces of information that I need. I did find these constants: 


      • Constants.FV_FindPgfFormatOverride
      • Constants.FV_FindCharacterFormatOverride


      But there's literally no information about them. There's not even a definition, so I am actually just making an educated guess. However, I suspect that I somehow need to use these constant's in the Find method's parameters. Any ideas about how to do that?

        • 1. Re: How do I use the find method to search for character and pgf format overrides?
          OliverJohn Level 2

          You're right, there are still a few bugs to work out of the documentation, though it has already improved dramatically since I started working w/ Extendscript last summer.


          Either of the constants you found should be set as the ival for a FindObject PropVal, e.g.,:


               var myDoc = app.ActiveDoc;

               var docStart = myDoc.MainFlowInDoc.FirstTextFrameInFlow.FirstPgf ;

               var tloc = new TextLoc(docStart,0);

               var findParams = AllocatePropVals(1);


               findParams[0].propIdent.num = Constants.FS_FindObject;

               findParams[0].propVal.valType = Constants.FT_Integer;

               findParams[0].propVal.ival = Constants.FV_FindCharacterFormatOverride;




          Depending on what you're trying to accomplish, you may also want to take a look at the FormatOverride property of the Doc, Pgf, and Element objects.