6 Replies Latest reply on Jul 9, 2008 6:23 AM by Loic.Aigon

    Indesign CS2 find text

    hm_arul Level 1
      Hi scripters

      here I am trying to find +,=,- (plus,equal,minus) symbols and replace with math pi one font.

      how can I do this. I am using indesign cs2 javascript. Pls advice me.

      thanks in advance

      regards
      a r u l
        • 1. Re: Indesign CS2 find text
          Loic.Aigon Adobe Community Professional
          It depends on your main intention.
          Do you want to replace any + character then any = character then finally any - character or the specific string +,=,- ?

          There is a script for replacing text,
          you should have no difficulties to adapt the searched items to your needs.
          Characters unicode value are displayed in the info palette. So type once tou Math symbol then get the unicode value.
          I am trying to find back the script.
          Loic
          • 2. Re: Indesign CS2 find text
            Level 1
            See: http://adobeforums.com/webx/.59b59f12/1

            I suggest you create a mathPi character style, so you can set:

            app.changePreferences.appliedCharacterStyle = "mathPi"

            before doing your searches. I imagine that you'll have to use unicode values for the changeTo characters.

            Dave
            • 3. Re: Indesign CS2 find text
              Loic.Aigon Adobe Community Professional
              Thanks to Ole,<br /><br />//TextCleanup.jsx<br />//An InDesign CS2 JavaScript<br />//<br />//Loads a series of tab-delimited strings from a text file, then performs a series<br />//of find/change operations based on the strings read from the file.<br />//<br />//The data file is tab-delimited, with carriage returns separating records.<br />//<br />//The format of each record in the file is:<br />//findProperties<tab>changeProperties<tab>range_string<tab>description<br />//<br />//Where:<br />//<tab> is a tab character<br />//findProperties is a properties record (as text)<br />//changeProperties is a properties record (as text)<br />//range_string is either "all" or "once"<br />//description is a description of the find/change operation<br />//<br />//Very simple example:<br />//{findText:" "} {changeText:" "} all Find all double spaces and replace with single spaces.<br />//<br />//More complex example:<br />//{findText:"^9^9.^9^9"} {appliedCharacterStyle:"price"} once Find $10.00 to $99.99 and apply the character style "price".<br />//<br />//All InDesign search metacharacters are allowed in the findText property; all but wildcards are allowed in the changeText property.<br />//
              • 4. Re: Indesign CS2 find text
                hm_arul Level 1
                Hi Dave

                thanks I learned a lot from you, thanks again

                regards
                a r u l
                • 5. Re: Indesign CS2 find text
                  hm_arul Level 1
                  Hi loic_aigon

                  thanks for your advice, it works good.

                  thanks again

                  regards
                  a r u l
                  • 6. Re: Indesign CS2 find text
                    Loic.Aigon Adobe Community Professional
                    Thank Ole ! He uses to be around.