4 Replies Latest reply on Nov 11, 2013 1:35 AM by lister110

    find and replace roll over text in button - Ind CC

    lister110 Level 1

      Hi, sorry if this is a simple question, but Im translating an interactive indesign file. There are a few buttons with a word on the roll over text which i need to replace. When I do a simple find and replace it doesnt pick up those perticular states.

       

      any ideas how to change this without going through each one, changing the state copying and then changing it back

       

       

      Thanks

       

       

      lister

        • 1. Re: find and replace roll over text in button - Ind CC
          Laubender Adobe Community Professional & MVP

          @lister110 – I think you are referring to the "description" property of a button in the "PDF Options" (In my German InDesign: "Beschreibung" in "PDF-Optionen"):

           

          Button_Rollover_Description_PDF-Options.png

           

          This is no regular text, so cannot be searched and replaced with Text Search/Replace.

           

          But we could do that with a script.

           

          Some questions:
          How many buttons and how many replacements do you have?

           

          For a diagonsis you can use the following script (ExtendScript [JavaScript]), if the buttons are not nested in objects (grouped, pasted inside, anchored, are inside MSOs), but are simply positioned on pages:

           

          var d=app.documents[0];
          var b=d.buttons.everyItem().description;
          
          b.reverse();
          b.push("Number of buttons: "+b.length.toString()+"\r");
          b.reverse();
          
          
          if(b.length > 0){
              
              var myArray = b;
              var myMessageHeader = "Number of plain buttons and descriptions:";
          
              alert_scroll(myMessageHeader,myArray);
              };
          
          else{alert("No Buttons detected.")};
          
          
          //FUNCTION alert_scroll(){}
          //Peter Kahrel
          //See discussions at:
          //http://forums.adobe.com/message/4393469#4393469
          //Marijan Tompa [Tomaxxi]
          //http://tomaxxi.com/2010/07/scrollable-alert/
          
          
          
          function alert_scroll (/*String*/title,/*Array*/input){
              
                 if(input instanceof Array){input = input.join ("\r")};
                 
                 var w = new Window ("dialog", title);
                 
                 var list = w.add("edittext", undefined, input, {multiline: true, scrolling: true});
                 
                 list.maximumSize.height = w.maximumSize.height-100;
                 list.minimumSize.width = 550;
                 
                 w.add("button", undefined, "Close", {name: "ok"});
                 w.show();
                 
          };
          

           

          Here a screen shot after running the script on a document with three buttons:

           

          ScrollableAlert_TextSelectable.png

           

          The text in the scrollable alert is selectable. You can copy/paste it for further use.

          Empty lines indicate, that there is no text in the decription field of a specific button.

           

          For scripters reading this: The function for that scrollable alert is by Marijan Tompa and  discussed by Peter Kahrel.
          See the URLs inside the script. Thank you Marijan and Peter for sharing this!

           

          Back to the problem:

          If the buttons are nested it is a bit more complicated, but also possible to define pairs of text strings for replacement.

          This is more work to script and needs some preparation for the text string replacements.

           

          Now, what do you think?

           

          Uwe

          • 2. Re: find and replace roll over text in button - Ind CC
            Laubender Adobe Community Professional & MVP

            @lister110 – another thing: I hope, the Scrollable Alert will work in InDesign CC v9.1. There are some reports, that the UI one can build by scripting has some severe bugs.

             

            If that will work, I could expand the script.

            The following workflow with the expanded version of the script could be replace all descriptions with your translations:

             

            1. Run the advanced script (not posted yet!) once
            2. Copy/Paste the results (the descriptions) to a new text frame in your document

            3. Convert the text to a table

            4. Change the contents of that table to your translations

            5. Select the table and run the script again

            6. The descriptions will be replaced with the contents of the table

             

            Uwe

             

            Message was edited by: Laubender

            • 3. Re: find and replace roll over text in button - Ind CC
              Laubender Adobe Community Professional & MVP

              @lister110 – SInce you are a translator, do you use any special tools like "Trados" for doing your job?

               

              If yes, is there support for an IDML workflow with InDesign CC?
              The button descriptions are stored inside an IDML file. Question is, can the translation software make them visible and deal with that…

               

              Uwe

              • 4. Re: find and replace roll over text in button - Ind CC
                lister110 Level 1

                Thanks for your help on this. Yes, I have used Trados in the past and thats fine. But in this instance all the text is in a powerpoint file and Im adding the this text to indesign.

                 

                I have a navigation menu in the side bar which had states

                 

                Home / Our tests / advanced.

                 

                These buttons have been built with the text on the rollover states which is a problem as the search ad replace only picks up the normal state. Unless the find a replace feature can pick up over states.

                 

                I havent checked your scripts yet, I'll try that later.

                 

                Thanks

                 

                lister