14 Replies Latest reply on Apr 2, 2017 4:42 PM by sidneydavenport

    (Find/Change) locked text frame

    YalaKahtan Level 1

      Dear all,

       

      Is it possible to find locked text frame, and change it with unlocked text frame? If yes, how?

       

      Regards.

        • 1. Re: (Find/Change) locked text frame
          Steve Werner Adobe Community Professional & MVP

          There is no way in the UI to search and replace a locked text frame with an unlocked text frame. (I suspect that this could be scripted, but don't know.)

           

          You can unlock manually if you turn on View > Extras > Show Frame Edges to view the lock icon. Or you can view frames in the Layers panel. You can unclick the lock icon in the lock column.

          1 person found this helpful
          • 2. Re: (Find/Change) locked text frame
            John Hawkinson Level 5
            There is no way in the UI to search and replace a locked text frame with an unlocked text frame. (I suspect that this could be scripted, but don't know.)

            Sure, but I'm confused. Why not just unlock the frame? What's with replacing?

            • 3. Re: (Find/Change) locked text frame
              Peter Spier Most Valuable Participant (Moderator)

              I think that's the intent of the OP. I suspect English is not his first language and it's a matter of nuance.

               

              I'm not sure why the OP want's to unlock the frames, but perhaps it's so he can edit the text inside. I'll bet he's got the default preference set that prevents selection of locked frames. I f you change that, the lock becomes a position lock, but you can still select and edit the content -- the behavior up to CS4.

               

              Also, though there is no menu command to unlock an entire document, there is a command in the Object menu to unlock all on the spread (though it doesn't care about the type of object).

              • 4. Re: (Find/Change) locked text frame
                YalaKahtan Level 1

                Thank you all.

                 

                The aim of solving this problem is removing a major obstacle in InDesign CS5 which prevents files created in CS3 and CS4 - with hundreds of locked text frames - from Find and Change.

                 

                Unfortunately, InDesign CS5.5 does not solve this matter.

                • 5. Re: (Find/Change) locked text frame
                  Peter Spier Most Valuable Participant (Moderator)

                  Unchecking the box that says Prevent Selection of Locked Objects under Object Editing in the General section of your prefs will allow you to edit manually, but unfortuanely not with Find/Change (though it will allow you to step through and make the changes manually, then find next, if you use a GREP query) if you press the "include locked layers and locked objects" button.

                   

                  For more powerful unlocking, you'll need a script.

                  • 6. Re: (Find/Change) locked text frame
                    [Jongware] Most Valuable Participant

                    Perhaps all that's needed is this one-line Javascript?

                     

                    app.activeDocument.textFrames.everyItem().locked = false;

                     

                    (It works in CS4.)

                    2 people found this helpful
                    • 7. Re: (Find/Change) locked text frame
                      YalaKahtan Level 1

                      Thank you.

                       

                      As you say: For more powerful unlocking, you'll need a script.

                      • 8. Re: (Find/Change) locked text frame
                        YalaKahtan Level 1

                        Good news.

                         

                        Please, write all steps to use this one-line Javascript such as:

                        - Where paste this line? e.g. Notepad?

                        - Extension of file?

                        - Path of file?

                         

                        Regards.

                        • 9. Re: (Find/Change) locked text frame
                          [Jongware] Most Valuable Participant

                          No problem.

                           

                          (1) Notepad is just fine.

                          (2) jsx

                          (3) C:\Users\(your name)\AppData\Roaming\Adobe\InDesign\Version 6.0\en_GB\Scripts\Scripts Panel

                           

                          Notes

                          1. Notepad is fine because it's a plain text editor, and Javascripts need to be saved as plain text. So don't use Word Infamously, OS X's default text editor "TextEdit" defaults to saving new documents as formatted Rich Text, and that's not going to work.

                          Your standard InDesign installation also comes with a Javascript editor, called the Adobe Extendscript Toolkit.

                           

                          2. This is the standard file extension for an Extendscript (Adobe's particular flavour of Javascript). The 'old' extension "js" also works, but since this is also in use for other kinds of Javascript, such as used in your browser, it might just be safer to use "jsx".

                           

                          3. That's on a Windows 7 machine and with InDesign CS4, which internally is called "Version 6.0". If I were sitting behind my Mac I could tell you the default script path for OS X, but it's as complicated as this one!

                          Another way to quickly navigate to the Scripts Panel folder is: start InDesign, make sure the Scripts panel is opened, right-click any script in there and select "Reveal in Explorer". If you do this on the little 'sub-folder' named "User", you will see an Explorer folder that contains only one other folder: "Scripts Panel". Scripts placed into this will immediately appear in the Scripts panel in ID, no restarts required.

                          • 10. Re: (Find/Change) locked text frame
                            YalaKahtan Level 1

                            Thank you very much for your detailed answer and amazing script. It solves this matter completely.

                             

                            When double click your script, all text frames in the document will unlock. Then, it is possible to Find/Change properly.

                             

                            After finishing Find/Change, user may need to lock all text frames again. Therefore, I tried this one:

                            app.activeDocument.textFrames.everyItem().locked = true;

                             

                            When double click this last script, all text frames in the document will lock.

                             

                            These scripts work in CS5 and CS5.5 too.

                             

                            Best Regards.

                            • 11. Re: (Find/Change) locked text frame
                              HeyMikey Level 3

                              Hey there! It works in CS5, as well. Great little script!

                               

                              Cheers,

                              Mikey

                              • 12. Re: (Find/Change) locked text frame
                                YalaKahtan Level 1

                                This amazing script works in CS3, CS4, CS5, and CS5.5.

                                 

                                Best Regards.

                                • 13. Re: (Find/Change) locked text frame
                                  smithpr Level 1

                                  Just tried these scripts on a CS6 document and they worked there too.  Lifesaver!  Thanks!

                                  • 14. Re: (Find/Change) locked text frame
                                    sidneydavenport Level 1

                                    Jongware --Thank you so much. That saved time. Now to resize all. --siddav