4 Replies Latest reply on Oct 2, 2016 1:14 PM by Obi-wan Kenobi

    Find/Replace limited to a text selection or the active story! …

    Obi-wan Kenobi Adobe Community Professional

      Hi all,

       

      I can't find the good syntax to limit my research! 

       

      Placing the cursor in a story or selecting a story text frame:

       

      var mySelectedContent = app.selection[0].parentStory.contents;
      

       

      … or selecting text:

       

      var mySelectedContent = app.selection[0].contents;
      

       

      … but after!? …

       

      app.findGrepPreferences = app.changeGrepPreferences = null;  
      app.findGrepPreferences.findWhat = "……";
      ……
      

       

      Thanks in advance!

       

      (^/)