2 Replies Latest reply on Dec 23, 2014 2:44 AM by hamdifem

    selected text deleting or unselected text running

    hamdifem Level 1

      sometimes selected text I want to run by deleting

      How do I write a script


      if (app.selection[0].texts[0] > 0){  //?????????



      app.selection[0].texts[0].insertionPoints.item(-1).contents = "klmn";


      this case  (abcd) - selected

      run script and result  (abcdklmn)

      I want (klmn)


      this case () unselected

      run script and result  (klmn)

      I want (klmn)