3 Replies Latest reply on May 12, 2008 10:46 PM by Peter Kahrel

    Reference saved query in Find/change script?

    jkinsman Level 1
      I want to use the find change script included with InDesign but I want to reference my saved queries. The reference for this script doesn't explain how to do this but this seems like the best way to run several queries in a row.

      The Find Change script refrences a text document that tells it what to find and change.

      Thanks
      Jesse
        • 1. Re: Reference saved query in Find/change script?
          [Jongware] Most Valuable Participant
          From the Help (with quite a lot of searching):

          b Application
          void loadFindChangeQuery (queryName: string, searchMode: SearchModes)
          Loads the specified find/change query.
          queryName string The query to load.

          searchMode SearchModes: TEXT_SEARCH
          GREP_SEARCH
          GLYPH_SEARCH
          OBJECT_SEARCH

          I sort of gathered it should be under Application, and so it was. And in hindsight, with a logical name as well! Didn't even know ID could do this.
          The ESTK2 does not supply code snippets, but I'm sure you can work it out from this :-)
          • 2. Re: Reference saved query in Find/change script?
            jkinsman Level 1
            Thanks I am trying to use this but I am realizing what I don't know when it comes to scripting. Do I need to include the absoluter path to the query or will Indesign figure out where it's find/change queries are located?

            Jesse
            • 3. Re: Reference saved query in Find/change script?
              Peter Kahrel Adobe Community Professional & MVP
              >Do I need to include the absoluter path to the query or will Indesign figure out where it's find/change queries are located?

              There's only one way to find out, as they say: try it. Always the best way forward in scripting. In your case, first try whether it works without an absolute path. If that doesn't work, try something else. And so on.

              Peter