3 Replies Latest reply on Nov 12, 2010 3:13 PM by sstanleyau

    AppleScript to Copy Text in Selected Text Box

    jo2mendoza Level 1

      I need assistance in AppleScript in InDesign CS2.


      I have 5 text (stories) boxes in a page.


      Story 1 to 4 boxes have text; Story 5 box is empty.


      I click on Story 1 and Story 3.


      The script I need is to copy the text on the selected text boxes that is clicked, which in this case is Story 1 and copy it to the empty Story 5 box. Then the other clicked text box, Story 3, is also copied in Story 5.


      I already know the command to copy:

      "select text in story 1 of document 1"



      But I am stuck on the command to choose the other selected boxes and copy to Story 5.


      Any suggestions?




      Other question also an AppleScript for CS2:


      My current command to paste a text is using the system events.


      In the above, my command to copy and paste an item is:


      tell application "InDesign CS2"

        select text in story 1 of document 1


        select text in story 5 of document 5

      end tell


      tell application "System Events"

         tell process "Adobe InDesign CS2"

             keystroke "v" using command down

         end tell

      end tell


      Is there a better command on pasting other than the system events command?