0 Replies Latest reply on Aug 25, 2011 7:11 PM by AaronKuehn

    JavaScript To Transpose Words

    AaronKuehn Level 1

      [Also posted on the InCopy Scripting forum -- this will be an InCopy script -- but hoping for other insights from the InDesign side.]


      I am trying to write a JavaScript to transpose adjacent words.


      I plan to use the "move" function but am having trouble getting a reference to the word under the cursor.


      I can find out which character I am in within the story...but don't think I should need to iterate through all of the characters in the story to determine the word number.


      Can someone provide some guidance on how I can determine the number of the word under the cursor?


      Thanks much!