1 Reply Latest reply on Jul 2, 2009 7:01 AM by Thomas B. Nielsen

    [JS CS3/4] Store data from app.selection[0] even after deselection

    Loic.Aigon Adobe Community Professional


      I am facing a matter that I can't find a way out.


      To be brief, I am trying to store app.selection[0].contents (some text) & get access to that value even after the text is deselected.




      In case I am wrong (May be :-S), let me detail the process of my script:


      1. A user selects some text

      2. The user launches the script

      3. The script picks the contents of the selection

      var sel=app.selection[0];

      var myOriginalContents = sel.contents;

      4. ...makes a index reference & topic

      5. ...generates the index on last page

      6. ...find original contents in the index text frame



      7. ..selects found text


      8. ...adds a hyperlink (source = text; destination = original selection page, name = myOriginalContents).